blob: c68254ff3dab8b196ae500fdbe7426a90bd76b89 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001From d95c4018ad57c37f6272dbedfa5217776567c329 Mon Sep 17 00:00:00 2001
2From: Christopher Larson <chris_larson@mentor.com>
3Date: Tue, 26 Nov 2019 22:34:34 +0500
4Subject: [PATCH] Wrap pthread_atfork usage in HAVE_PTHREAD_H
5
6Upstream-Status: Pending
7Signed-off-by: Christopher Larson <chris_larson@mentor.com>
8---
9 src/cap-ng.c | 2 ++
10 1 file changed, 2 insertions(+)
11
12diff --git a/src/cap-ng.c b/src/cap-ng.c
13index 35fcd7a..97a3dbd 100644
14--- a/src/cap-ng.c
15+++ b/src/cap-ng.c
16@@ -166,7 +166,9 @@ static void deinit(void)
17 static void init_lib(void) __attribute__ ((constructor));
18 static void init_lib(void)
19 {
20+#ifdef HAVE_PTHREAD_H
21 pthread_atfork(NULL, NULL, deinit);
22+#endif
23 }
24
25 static void init(void)