From: Nikos Mavrogiannopoulos Date: Sat, 30 Nov 2013 08:35:01 +0000 (+0100) Subject: Detect the presence of posix locks even without linked to libpthread. X-Git-Tag: gnutls_3_3_0pre0~525 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=caa461e49f047516ee95acf6d9639d15f2b04438;p=thirdparty%2Fgnutls.git Detect the presence of posix locks even without linked to libpthread. --- diff --git a/lib/system.h b/lib/system.h index 9523b339e2..d2e695a40c 100644 --- a/lib/system.h +++ b/lib/system.h @@ -53,14 +53,12 @@ ssize_t system_writev(gnutls_transport_ptr_t ptr, const giovec_t * iovec, ssize_t system_read(gnutls_transport_ptr_t ptr, void *data, size_t data_size); -#ifdef _WIN32 -#define HAVE_WIN32_LOCKS -#else -#ifdef HAVE_LIBPTHREAD -#define HAVE_PTHREAD_LOCKS +#if defined(_WIN32) +# define HAVE_WIN32_LOCKS +#elif defined(HAVE_LIBPTHREAD) || defined(HAVE_PTHREAD_MUTEX_LOCK) +# define HAVE_PTHREAD_LOCKS #else -#define HAVE_NO_LOCKS -#endif +# define HAVE_NO_LOCKS #endif extern gnutls_time_func gnutls_time;