Skip to content

Commit

Permalink
core: build with threading disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
alonbl committed Aug 16, 2018
1 parent b811367 commit 4ea1afe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Copyright (c) 2005-2018 Alon Bar-Lev <alon.barlev@gmail.com>

????-??-?? - Version 1.26

* core: build with threading disabled

2018-08-04 - Version 1.25

Expand Down
2 changes: 1 addition & 1 deletion lib/_pkcs11h-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,10 @@ struct _pkcs11h_data_s {
_pkcs11h_mutex_t session;
_pkcs11h_mutex_t cache;
} mutexes;
#endif
#if !defined(_WIN32)
PKCS11H_BOOL safefork;
#endif
#endif

#if defined(ENABLE_PKCS11H_SLOTEVENT)
struct {
Expand Down
6 changes: 4 additions & 2 deletions lib/pkcs11h-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ CK_RV
pkcs11h_setForkMode (
IN const PKCS11H_BOOL safe
) {
#if defined(ENABLE_PKCS11H_THREADING) && !defined(_WIN32)
#if !defined(_WIN32)
_PKCS11H_ASSERT (_g_pkcs11h_data!=NULL);
_PKCS11H_ASSERT (_g_pkcs11h_data->initialized);

Expand Down Expand Up @@ -1009,7 +1009,9 @@ pkcs11h_forkFixup (void) {
#if defined(ENABLE_PKCS11H_THREADING)
return CKR_OK;
#else
return __pkcs11h_forkFixup (_g_pkcs11h_data->safefork);
if (_g_pkcs11h_data->safefork) {
return __pkcs11h_forkFixup (TRUE);
}
#endif
#endif
}
Expand Down

0 comments on commit 4ea1afe

Please sign in to comment.