summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAusmus, James <james.ausmus@intel.com>2017-09-27 16:08:27 -0700
committerPetri Latvala <petri.latvala@intel.com>2017-10-04 13:37:31 +0300
commit7c9dccb596b6467899c993a7df5d32574c1b89b9 (patch)
tree8fdfa34392f7c1b1cd0bf5dde53e2ae257bcd707
parent7fd0cae99630f954cfe0089b4b7e91576a353582 (diff)
Fix compilation on some distros
Some distros (such as Gentoo) are removing the include of sys/sysmacros.h from sys/types.h. Explicitly include sysmacros.h in files where we use the minor() and major() functions. Signed-off-by: James Ausmus <james.ausmus@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
-rw-r--r--lib/igt_debugfs.c1
-rw-r--r--lib/igt_sysfs.c1
-rw-r--r--tools/aubdump.c1
3 files changed, 3 insertions, 0 deletions
diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index 1e8c8cc3c..60b29e3a0 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -25,6 +25,7 @@
#include <inttypes.h>
#include <sys/stat.h>
#include <sys/mount.h>
+#include <sys/sysmacros.h>
#include <dirent.h>
#include <errno.h>
#include <stdio.h>
diff --git a/lib/igt_sysfs.c b/lib/igt_sysfs.c
index 6f03008b1..e7c67dae3 100644
--- a/lib/igt_sysfs.c
+++ b/lib/igt_sysfs.c
@@ -24,6 +24,7 @@
#include <inttypes.h>
#include <sys/stat.h>
+#include <sys/sysmacros.h>
#include <sys/mount.h>
#include <errno.h>
#include <stdarg.h>
diff --git a/tools/aubdump.c b/tools/aubdump.c
index 78d183f49..ee4d99b06 100644
--- a/tools/aubdump.c
+++ b/tools/aubdump.c
@@ -30,6 +30,7 @@
#include <stdarg.h>
#include <fcntl.h>
#include <sys/types.h>
+#include <sys/sysmacros.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <unistd.h>