Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | From d95c4018ad57c37f6272dbedfa5217776567c329 Mon Sep 17 00:00:00 2001 |
| 2 | From: Christopher Larson <chris_larson@mentor.com> |
| 3 | Date: Tue, 26 Nov 2019 22:34:34 +0500 |
| 4 | Subject: [PATCH] Wrap pthread_atfork usage in HAVE_PTHREAD_H |
| 5 | |
| 6 | Upstream-Status: Pending |
| 7 | Signed-off-by: Christopher Larson <chris_larson@mentor.com> |
| 8 | --- |
| 9 | src/cap-ng.c | 2 ++ |
| 10 | 1 file changed, 2 insertions(+) |
| 11 | |
| 12 | diff --git a/src/cap-ng.c b/src/cap-ng.c |
| 13 | index 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) |