0003-ps-output.c-include-dlfcn.h-only-when-necessary.patch 854 B

1234567891011121314151617181920212223242526272829303132
  1. From 4fc9a348026a945aec8eddffc7613de9cb10b10c Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Sun, 7 Aug 2016 11:08:26 +0200
  4. Subject: [PATCH] ps/output.c: include <dlfcn.h> only when necessary
  5. dlopen() functionality is only used when SELinux support is enabled, so
  6. <dlfcn.h> only needs to be included when ENABLE_LIBSELINUX is
  7. defined. This fixes the build in configurations where <dlfcn.h> is not
  8. available.
  9. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  10. ---
  11. ps/output.c | 2 ++
  12. 1 file changed, 2 insertions(+)
  13. diff --git a/ps/output.c b/ps/output.c
  14. index 42c04cf..f540832 100644
  15. --- a/ps/output.c
  16. +++ b/ps/output.c
  17. @@ -46,7 +46,9 @@
  18. */
  19. #include <ctype.h>
  20. +#if ENABLE_LIBSELINUX
  21. #include <dlfcn.h>
  22. +#endif
  23. #include <fcntl.h>
  24. #include <grp.h>
  25. #include <limits.h>
  26. --
  27. 2.7.4