summaryrefslogtreecommitdiff
blob: 5d7352669f21a6ccc003639ab90f8e9a90af3304 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# https://github.com/buytenh/ivykis/issues/15
# https://github.com/buytenh/ivykis/pull/16

diff --git a/configure.ac b/configure.ac
index e9b10c0..56440d1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -88,6 +88,8 @@ esac
 # link in libpthread_nonshared.a if it is available.
 #
 AC_CHECK_LIB([pthread_nonshared], [pthread_atfork])
+# the lib is gone in glibc 2.28, things are now in c_nonshared
+AC_CHECK_LIB([c_nonshared], [pthread_atfork])
 
 # Checks for header files.
 AC_CHECK_HEADERS([process.h])
diff --git a/src/pthr.h b/src/pthr.h
index a41eaf3..32c1af2 100644
--- a/src/pthr.h
+++ b/src/pthr.h
@@ -42,7 +42,7 @@ static inline int pthreads_available(void)
  * symbol because that causes it to be undefined even if you link
  * libpthread_nonshared.a in explicitly.
  */
-#ifndef HAVE_LIBPTHREAD_NONSHARED
+#if !defined(HAVE_LIBPTHREAD_NONSHARED) && !defined(HAVE_LIBC_NONSHARED)
 #pragma weak pthread_atfork
 #endif