Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
344b4ead
Unverified
Commit
344b4ead
authored
Dec 01, 2017
by
Edward Thomson
Committed by
GitHub
Dec 01, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4427 from pks-t/pks/openssl-threadid
openssl: fix thread-safety on non-glibc POSIX systems
parents
494a2f23
2d2e70f8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
src/streams/openssl.c
+9
-0
No files found.
src/streams/openssl.c
View file @
344b4ead
...
...
@@ -150,11 +150,20 @@ int git_openssl_stream_global_init(void)
return
0
;
}
#if defined(GIT_THREADS)
static
void
threadid_cb
(
CRYPTO_THREADID
*
threadid
)
{
CRYPTO_THREADID_set_numeric
(
threadid
,
git_thread_currentid
());
}
#endif
int
git_openssl_set_locking
(
void
)
{
#if defined(GIT_THREADS) && OPENSSL_VERSION_NUMBER < 0x10100000L
int
num_locks
,
i
;
CRYPTO_THREADID_set_callback
(
threadid_cb
);
num_locks
=
CRYPTO_num_locks
();
openssl_locks
=
git__calloc
(
num_locks
,
sizeof
(
git_mutex
));
GITERR_CHECK_ALLOC
(
openssl_locks
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment