]> granicus.if.org Git - libatomic_ops/commitdiff
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>
Tue, 16 Jan 2018 08:50:35 +0000 (11:50 +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 eed7dea02627c302ddd0eaa58720a05b8a2d4d8a..6daa884e062abffa13612e9dedb91fb84f6c94c8 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)