]> granicus.if.org Git - procps-ng/commitdiff
ps/output.c: include <dlfcn.h> only when necessary
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 7 Aug 2016 09:08:26 +0000 (11:08 +0200)
committerCraig Small <csmall@enc.com.au>
Mon, 15 Aug 2016 11:10:30 +0000 (21:10 +1000)
dlopen() functionality is only used when SELinux support is enabled, so
<dlfcn.h> only needs to be included when ENABLE_LIBSELINUX is
defined. This fixes the build in configurations where <dlfcn.h> is not
available.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
ps/output.c

index 60d18d83c9a4b8b049d9d0b2ba23a1d0c73af8a7..4a6c10209eaf5133beffe07e45b4a4316d0906f7 100644 (file)
@@ -46,7 +46,9 @@
  */
 
 #include <ctype.h>
+#if ENABLE_LIBSELINUX
 #include <dlfcn.h>
+#endif
 #include <fcntl.h>
 #include <grp.h>
 #include <limits.h>