makedev() is defined in <sys/types.h> on BSDs and <sys/mkdev.h> on Solaris

media_driver/linux/common/os/i915/xf86drm.c:50:10: fatal error: 'sys/sysmacros.h' file not found
#include <sys/sysmacros.h>
         ^~~~~~~~~~~~~~~~~
media_driver/linux/ult/libdrm_mock/xf86drm_mock.c:50:10: fatal error: 'sys/sysmacros.h' file not found
#include <sys/sysmacros.h>
         ^~~~~~~~~~~~~~~~~

--- media_driver/linux/common/os/i915/xf86drm.c.orig	2018-10-01 21:39:52 UTC
+++ media_driver/linux/common/os/i915/xf86drm.c
@@ -47,13 +47,15 @@
 #include <signal.h>
 #include <time.h>
 #include <sys/types.h>
+#if defined(__GLIBC__) || defined(__linux__)
 #include <sys/sysmacros.h>
+#endif
 #include <sys/stat.h>
 #define stat_t struct stat
 #include <sys/ioctl.h>
 #include <sys/time.h>
 #include <stdarg.h>
-#ifdef HAVE_SYS_MKDEV_H
+#ifdef __sun
 # include <sys/mkdev.h> /* defines major(), minor(), and makedev() on Solaris */
 #endif
 
--- media_driver/linux/ult/libdrm_mock/xf86drm_mock.c.orig	2018-10-01 21:39:52 UTC
+++ media_driver/linux/ult/libdrm_mock/xf86drm_mock.c
@@ -47,16 +47,20 @@
 #include <signal.h>
 #include <time.h>
 #include <sys/types.h>
+#if defined(__GLIBC__) || defined(__linux__)
 #include <sys/sysmacros.h>
+#endif
 #include <sys/stat.h>
 #define stat_t struct stat
 #include <sys/ioctl.h>
 #include <sys/time.h>
 #include <stdarg.h>
-#ifdef HAVE_SYS_MKDEV_H
+#ifdef __sun
 # include <sys/mkdev.h> /* defines major(), minor(), and makedev() on Solaris */
 #endif
+#if defined(__GLIBC__) || defined(__linux__)
 #include <sys/sysmacros.h>
+#endif
 
 /* Not all systems have MAP_FAILED defined */
 #ifndef MAP_FAILED
