[Mesa-dev] [PATCH] libdrm: Fix QNX build by including 'sys/ioctl.h'

Miguel A. Vico mvicomoya at nvidia.com
Mon Dec 4 22:41:40 UTC 2017


drm.h header includes 'sys/ioccom.h' for ioctl
definitions on non-linux Unix platforms, but QNX
seems to define those in 'sys/ioctl.h' instead.

Signed-off-by: Miguel A Vico Moya <mvicomoya at nvidia.com>
---
 include/drm/drm.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/drm/drm.h b/include/drm/drm.h
index f0bd91de..ec0e1fd7 100644
--- a/include/drm/drm.h
+++ b/include/drm/drm.h
@@ -44,7 +44,12 @@ typedef unsigned int drm_handle_t;
 
 #else /* One of the BSDs */
 
+#if (defined(__QNX__) || defined(__QNXNTO__))
+#include <sys/ioctl.h>
+#else
 #include <sys/ioccom.h>
+#endif
+
 #include <sys/types.h>
 typedef int8_t   __s8;
 typedef uint8_t  __u8;
-- 
2.15.0



More information about the mesa-dev mailing list