summaryrefslogtreecommitdiff
path: root/src/anytun.cpp
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2008-10-21 04:11:47 +0000
committerChristian Pointner <equinox@anytun.org>2008-10-21 04:11:47 +0000
commit96f02c865e01d51aa4a5a135cfc6dc0c996a91e5 (patch)
treedf2389db52f4a1ad3ff5afb25430c5ee55afdbc6 /src/anytun.cpp
parentsmall cleanup (diff)
added some compile switches for boost using pthreads
Diffstat (limited to 'src/anytun.cpp')
-rw-r--r--src/anytun.cpp5
1 files changed, 4 insertions, 1 deletions
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<boost::mutex> 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"