gcrypt: Use predefined pthread locking functions instead of custom hooks
authorMartin Willi <martin@revosec.ch>
Tue, 1 Jul 2014 08:33:25 +0000 (10:33 +0200)
committerMartin Willi <martin@revosec.ch>
Tue, 1 Jul 2014 10:23:19 +0000 (12:23 +0200)
commit6fb12832420ad7f2c4a999f356e336bb7a6be9f6
treebead607b5e2db3476a86f9fcb7fb790a7dd121a7
parent8b123d2e4a48412a18dc2bb68f2437f4dd53f12a
gcrypt: Use predefined pthread locking functions instead of custom hooks

Starting with libgcrypt 1.6, it seems that custom locking functions are not
supported anymore. Instead, the user has to select from one of the pre-defined
set of locking functions.

Given that we have a proper threading abstraction API with optional profiling
on all platforms, this is somewhat annoying. However, there does not seem to be
a way to use custom functions, and we have no other choice than using the
provided macro magic to support all libgcrypt versions.

Fixes #630.
src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c