From 96f02c865e01d51aa4a5a135cfc6dc0c996a91e5 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Tue, 21 Oct 2008 04:11:47 +0000 Subject: added some compile switches for boost using pthreads --- src/anytun.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/anytun.cpp') diff --git a/src/anytun.cpp b/src/anytun.cpp index ddfacfd..3d7dd5d 100644 --- a/src/anytun.cpp +++ b/src/anytun.cpp @@ -327,7 +327,7 @@ void receiver(void* p) } // boost thread callbacks for libgcrypt - +#if defined(BOOST_HAS_PTHREADS) typedef boost::detail::thread::lock_ops mutex_ops; static int boost_mutex_init(void **priv) @@ -361,6 +361,9 @@ static struct gcry_thread_cbs gcry_threads_boost = { GCRY_THREAD_OPTION_USER, NULL, boost_mutex_init, boost_mutex_destroy, boost_mutex_lock, boost_mutex_unlock }; +#else +#error this libgcrypt thread callbacks only work with pthreads +#endif #define MIN_GCRYPT_VERSION "1.2.0" -- cgit v1.2.3