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