summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/libcap-ng/libcap-ng/0001-configure.ac-add-library-if-header-found.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/libcap-ng/libcap-ng/0001-configure.ac-add-library-if-header-found.patch')
-rw-r--r--meta/recipes-support/libcap-ng/libcap-ng/0001-configure.ac-add-library-if-header-found.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/meta/recipes-support/libcap-ng/libcap-ng/0001-configure.ac-add-library-if-header-found.patch b/meta/recipes-support/libcap-ng/libcap-ng/0001-configure.ac-add-library-if-header-found.patch
new file mode 100644
index 0000000000..0fcb032f90
--- /dev/null
+++ b/meta/recipes-support/libcap-ng/libcap-ng/0001-configure.ac-add-library-if-header-found.patch
@@ -0,0 +1,30 @@
1From 0230e2e374bb71aed0181ccd9ebd13c0c5125a5d Mon Sep 17 00:00:00 2001
2From: Trevor Woerner <twoerner@gmail.com>
3Date: Fri, 25 Oct 2019 17:01:20 -0400
4Subject: [PATCH] configure.ac: add library if header found
5
6If the pthread.h header is found, make sure library containing
7"pthread_atfork" is added to the list of libraries against which to link.
8On some hosts (e.g. openSUSE 15.1) "-lpthread" needs to be explicitly added
9in order for the code to compile correctly.
10
11Signed-off-by: Trevor Woerner <twoerner@gmail.com>
12---
13 configure.ac | 4 +++-
14 1 file changed, 3 insertions(+), 1 deletion(-)
15
16diff --git a/configure.ac b/configure.ac
17index 63088f4..639b464 100644
18--- a/configure.ac
19+++ b/configure.ac
20@@ -56,7 +56,9 @@ AC_CHECK_HEADERS(sys/xattr.h, [], [
21 AC_CHECK_HEADERS(attr/xattr.h, [], [AC_MSG_WARN(attr/xattr.h not found, disabling file system capabilities.)])
22 ])
23 AC_CHECK_HEADERS(linux/securebits.h, [], [])
24-AC_CHECK_HEADERS(pthread.h, [], [AC_MSG_WARN(pthread.h not found, disabling pthread_atfork.)])
25+AC_CHECK_HEADERS(pthread.h,
26+ [AC_SEARCH_LIBS(pthread_atfork, pthread)],
27+ [AC_MSG_WARN(pthread.h not found, disabling pthread_atfork.)])
28
29 AC_C_CONST
30 AC_C_INLINE