]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
Fix ctime_r configure error (MinGW-w64) 849/head
authorWolfgang Stöggl <c72578@yahoo.de>
Thu, 7 Dec 2017 20:43:53 +0000 (21:43 +0100)
committerWolfgang Stöggl <c72578@yahoo.de>
Thu, 7 Dec 2017 20:43:53 +0000 (21:43 +0100)
- configure.ac: include pthread.h inside AC_LANG_PROGRAM
  for ctime_r check if __MINGW32__ is defined
  Fixes:
  checking if ctime_r need special care to act posixly correct...
  configure: error: Can't figure how to compile ctime_r

configure.ac

index 207c6cc79c2a7a98a2586ff1fde93e8987cb0113..991109b79f423f6581c93cfb8d03bfc057b35ea0 100644 (file)
@@ -450,7 +450,10 @@ AC_LINK_IFELSE(
     ],
     [ AC_LINK_IFELSE(
           [AC_LANG_PROGRAM(
-                [[#include <time.h>]],
+                [[#ifdef __MINGW32__
+#include <pthread.h>
+#endif
+#include <time.h>]],
                 [[ctime_r(NULL,NULL)]])],
           [AC_MSG_RESULT(no)],
           [AC_MSG_ERROR([Can't figure how to compile ctime_r])]