contribs: gcrypt: Fix pthread detection
authorHugo Beauzée-Luyssen <hugo@beauzee.fr>
Thu, 20 Apr 2017 15:26:02 +0000 (17:26 +0200)
committerHugo Beauzée-Luyssen <hugo@beauzee.fr>
Fri, 21 Apr 2017 13:14:47 +0000 (15:14 +0200)
contrib/src/gcrypt/fix-pthread-detection.patch [new file with mode: 0644]
contrib/src/gcrypt/rules.mak

diff --git a/contrib/src/gcrypt/fix-pthread-detection.patch b/contrib/src/gcrypt/fix-pthread-detection.patch
new file mode 100644 (file)
index 0000000..8c69aba
--- /dev/null
@@ -0,0 +1,24 @@
+--- libgcrypt/configure.ac.old 2017-04-20 16:49:00.239092950 +0200
++++ libgcrypt/configure.ac     2017-04-20 16:57:18.205011934 +0200
+@@ -215,7 +215,6 @@
+ print_egd_notice=no
+ have_w32_system=no
+ have_w32ce_system=no
+-have_pthread=no
+ # Setup some stuff depending on host.
+@@ -751,10 +750,9 @@
+ # Check whether pthreads is available
+ #
+ if test "$have_w32_system" != yes; then
+-  AC_CHECK_LIB(pthread,pthread_create,have_pthread=yes)
+-  if test "$have_pthread" = yes; then
+-    AC_DEFINE(HAVE_PTHREAD, 1 ,[Define if we have pthread.])
+-  fi
++  AC_SEARCH_LIBS(pthread_create, pthread,[
++      AC_DEFINE(HAVE_PTHREAD, 1 ,[Define if we have pthread.])
++  ])
+ fi
index 141b32d..8b0fafb 100644 (file)
@@ -12,6 +12,7 @@ $(TARBALLS)/libgcrypt-$(GCRYPT_VERSION).tar.bz2:
 libgcrypt: libgcrypt-$(GCRYPT_VERSION).tar.bz2 .sum-gcrypt
        $(UNPACK)
        $(APPLY) $(SRC)/gcrypt/disable-tests-compilation.patch
+       $(APPLY) $(SRC)/gcrypt/fix-pthread-detection.patch
 ifdef HAVE_WINSTORE
        $(APPLY) $(SRC)/gcrypt/winrt.patch
 endif