[PATCH:libdrm] On Solaris, #include <sys/mkdev.h> in xf86drm.c

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

 



Needed for the definitions of major() & minor() used in
drmGetNodeTypeFromFd() and makedev() used in drmOpenMinor()

Signed-off-by: Alan Coopersmith <alan.coopersmith@xxxxxxxxxx>
---
 configure.ac |    2 ++
 xf86drm.c    |    3 +++
 2 files changed, 5 insertions(+)

diff --git a/configure.ac b/configure.ac
index 8afee83..bd39aa0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,6 +42,8 @@ AC_USE_SYSTEM_EXTENSIONS
 AC_SYS_LARGEFILE
 AC_FUNC_ALLOCA
 
+AC_CHECK_HEADERS([sys/mkdev.h])
+
 # Initialize libtool
 LT_PREREQ([2.2])
 LT_INIT([disable-static])
diff --git a/xf86drm.c b/xf86drm.c
index e117bc6..c901f8b 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -50,6 +50,9 @@
 #include <sys/ioctl.h>
 #include <sys/time.h>
 #include <stdarg.h>
+#ifdef HAVE_SYS_MKDEV_H
+# include <sys/mkdev.h> /* defines major(), minor(), and makedev() on Solaris */
+#endif
 
 /* Not all systems have MAP_FAILED defined */
 #ifndef MAP_FAILED
-- 
1.7.9.2

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux