summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Koegel <eric.koegel@gmail.com>2017-07-05 06:27:38 +0300
committerEric Koegel <eric.koegel@gmail.com>2017-07-06 21:18:26 +0300
commit792f327c2abf3f028c0dfe189ae5fb70a32b018c (patch)
tree3c4d0b79e3a912af5e669621b3e885a0fe861754
parent2095226293fc8d13e3fad30ca83d50d8692abc37 (diff)
downloadConsoleKit2-792f327c2abf3f028c0dfe189ae5fb70a32b018c.tar.gz
fix: Use #ifdef HEADER_H instead of #ifdef OS
To fix compiling on FreeBSD.
-rw-r--r--src/ck-sysdeps-unix.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/ck-sysdeps-unix.c b/src/ck-sysdeps-unix.c
index dcf6be0..a1043ba 100644
--- a/src/ck-sysdeps-unix.c
+++ b/src/ck-sysdeps-unix.c
@@ -33,7 +33,7 @@
#include <sys/ioctl.h>
#include <pwd.h>
-#ifdef __linux__
+#ifdef HAVE_LINUX_KD_H
#include <linux/kd.h>
#endif
@@ -57,11 +57,23 @@
#include <ucred.h>
#endif
-#ifdef __FreeBSD__
+#ifdef HAVE_KVM_H
#include <kvm.h>
+#endif
+
+#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
+#endif
+
+#ifdef HAVE_SYS_SYSCTL_H
#include <sys/sysctl.h>
+#endif
+
+#ifdef HAVE_SYS_USER_H
#include <sys/user.h>
+#endif
+
+#ifdef HAVE_PATHS_H
#include <paths.h>
#endif