You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
740 B

  1. From 9b5597dc780a9da292f9142899a992cfc6ca081d Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Thu, 7 May 2020 00:19:18 +0200
  4. Subject: [PATCH] src/cap-ng.c: fix build without threads (#13)
  5. Put pthread_atfork under #ifdef HAVE_PTHREAD_H block
  6. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  7. ---
  8. src/cap-ng.c | 2 ++
  9. 1 file changed, 2 insertions(+)
  10. diff --git a/src/cap-ng.c b/src/cap-ng.c
  11. index 35fcd7a..97a3dbd 100644
  12. --- a/src/cap-ng.c
  13. +++ b/src/cap-ng.c
  14. @@ -166,7 +166,9 @@ static void deinit(void)
  15. static void init_lib(void) __attribute__ ((constructor));
  16. static void init_lib(void)
  17. {
  18. +#ifdef HAVE_PTHREAD_H
  19. pthread_atfork(NULL, NULL, deinit);
  20. +#endif
  21. }
  22. static void init(void)