libcap-ng: update to 0.7.11lilik-openwrt-22.03
@ -1,30 +0,0 @@ | |||||
From 2c855b76362d1027abea967ac253cae8a7c160c3 Mon Sep 17 00:00:00 2001 | |||||
From: Trevor Woerner <twoerner@gmail.com> | |||||
Date: Wed, 6 May 2020 17:38:05 -0400 | |||||
Subject: [PATCH] configure.ac: add library if header found (#10) | |||||
If the pthread.h header is found, make sure library containing | |||||
"pthread_atfork" is added to the list of libraries against which to link. | |||||
On some hosts (e.g. openSUSE 15.1) "-lpthread" needs to be explicitly added | |||||
in order for the code to compile correctly. | |||||
Signed-off-by: Trevor Woerner <twoerner@gmail.com> | |||||
--- | |||||
configure.ac | 4 +++- | |||||
1 file changed, 3 insertions(+), 1 deletion(-) | |||||
diff --git a/configure.ac b/configure.ac | |||||
index 9d6aca3..4fbe4d3 100644 | |||||
--- a/configure.ac | |||||
+++ b/configure.ac | |||||
@@ -56,7 +56,9 @@ AC_CHECK_HEADERS(sys/xattr.h, [], [ | |||||
AC_CHECK_HEADERS(attr/xattr.h, [], [AC_MSG_WARN(attr/xattr.h not found, disabling file system capabilities.)]) | |||||
]) | |||||
AC_CHECK_HEADERS(linux/securebits.h, [], []) | |||||
-AC_CHECK_HEADERS(pthread.h, [], [AC_MSG_WARN(pthread.h not found, disabling pthread_atfork.)]) | |||||
+AC_CHECK_HEADERS(pthread.h, | |||||
+ [AC_SEARCH_LIBS(pthread_atfork, pthread)], | |||||
+ [AC_MSG_WARN(pthread.h not found, disabling pthread_atfork.)]) | |||||
AC_C_CONST | |||||
AC_C_INLINE |
@ -1,11 +0,0 @@ | |||||
diff -ru libcap-ng-0.7.4.orig/src/cap-ng.c libcap-ng-0.7.4/src/cap-ng.c | |||||
--- libcap-ng-0.7.4.orig/src/cap-ng.c 2014-04-24 15:41:43.000000000 -0300 | |||||
+++ libcap-ng-0.7.4/src/cap-ng.c 2015-04-15 08:45:10.783335463 -0300 | |||||
@@ -34,6 +34,7 @@ | |||||
#include <stdarg.h> | |||||
#include <errno.h> | |||||
#include <fcntl.h> | |||||
+#include <endian.h> | |||||
#include <byteswap.h> | |||||
#ifdef HAVE_SYSCALL_H | |||||
#include <sys/syscall.h> |
@ -1,26 +0,0 @@ | |||||
From 9b5597dc780a9da292f9142899a992cfc6ca081d Mon Sep 17 00:00:00 2001 | |||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com> | |||||
Date: Thu, 7 May 2020 00:19:18 +0200 | |||||
Subject: [PATCH] src/cap-ng.c: fix build without threads (#13) | |||||
Put pthread_atfork under #ifdef HAVE_PTHREAD_H block | |||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> | |||||
--- | |||||
src/cap-ng.c | 2 ++ | |||||
1 file changed, 2 insertions(+) | |||||
diff --git a/src/cap-ng.c b/src/cap-ng.c | |||||
index 35fcd7a..97a3dbd 100644 | |||||
--- a/src/cap-ng.c | |||||
+++ b/src/cap-ng.c | |||||
@@ -166,7 +166,9 @@ static void deinit(void) | |||||
static void init_lib(void) __attribute__ ((constructor)); | |||||
static void init_lib(void) | |||||
{ | |||||
+#ifdef HAVE_PTHREAD_H | |||||
pthread_atfork(NULL, NULL, deinit); | |||||
+#endif | |||||
} | |||||
static void init(void) |