[PATCH i-g-t] Fix compilation on some distros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 lib/igt_debugfs.c | 1 +
 lib/igt_sysfs.c   | 1 +
 tools/aubdump.c   | 1 +
 3 files changed, 3 insertions(+)

diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index 1e8c8cc3cd44..60b29e3a025a 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 817678bc28ed..f4e306003b01 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 78d183f49adc..ee4d99b06ed1 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>
-- 
2.14.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux