diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-08-31 11:45:57 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-08-31 11:47:18 +0100 |
commit | e8ad453a0ae9d701b41cc026d5d40f55dd4590c5 (patch) | |
tree | 52719db8120d59520e71fc468706cb0c76e4e9a4 | |
parent | 2086965e5c0781e0a3996de89e4dda03c5d42610 (diff) |
intel: Only include sys/mount.h on Linux
We only automount debugfs for Linux, but sys/mount.h on BSD has unmet
dependencies breaking the build.
Reported-by: Jonathan Gray <jsg@jsg.id.au>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/intel_device.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/intel_device.c b/src/intel_device.c index 9a2ebb0c..2e16ce5f 100644 --- a/src/intel_device.c +++ b/src/intel_device.c @@ -30,7 +30,6 @@ #include <sys/types.h> #include <sys/stat.h> -#include <sys/mount.h> #include <assert.h> #include <string.h> #include <unistd.h> @@ -126,9 +125,11 @@ static int drm_get_minor(int fd) return st.st_rdev & 0x63; } +#if __linux__ +#include <sys/mount.h> + static void dump_debugfs(ScrnInfoPtr scrn, int fd, const char *name) { -#if __linux__ char path[80]; int minor; @@ -150,8 +151,10 @@ static void dump_debugfs(ScrnInfoPtr scrn, int fd, const char *name) umount("X-debug"); return; } -#endif } +#else +static void dump_debugfs(ScrnInfoPtr scrn, int fd, const char *name) { } +#endif static void dump_clients_info(ScrnInfoPtr scrn, int fd) { |