Fix 'AO_pt_lock undefined' error if cross-compiling manually (MinGW)
authorIvan Maidanski <ivmai@mail.ru>
Tue, 16 Jan 2018 08:50:35 +0000 (11:50 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 5 Mar 2018 21:32:28 +0000 (00:32 +0300)
* tests/test_atomic.c [AO_USE_PTHREAD_DEFS] (main): Skip the test if
__MINGW32__ (even if AO_NO_PTHREADS is not defined).

tests/test_atomic.c

index eed7dea..6daa884 100644 (file)
@@ -15,7 +15,8 @@
 # include "config.h"
 #endif
 
-#if defined(AO_NO_PTHREADS) && defined(AO_USE_PTHREAD_DEFS)
+#if (defined(AO_NO_PTHREADS) || defined(__MINGW32__)) \
+    && defined(AO_USE_PTHREAD_DEFS)
 # include <stdio.h>
 
   int main(void)