anv: adjust headers for non-GNU after e9e1e0362b6c
authorJan Beich <jbeich@FreeBSD.org>
Tue, 22 Jun 2021 00:29:40 +0000 (00:29 +0000)
committerMarge Bot <eric+marge@anholt.net>
Tue, 22 Jun 2021 13:38:26 +0000 (13:38 +0000)
src/intel/vulkan/anv_device.c:27:10: fatal error: 'sys/sysmacros.h' file not found
 #include <sys/sysmacros.h>
          ^~~~~~~~~~~~~~~~~

Fixes: e9e1e036 ("anv: implement VK_EXT_physical_device_drm")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11516>

src/intel/vulkan/anv_device.c

index e329e29..1cede6d 100644 (file)
 #include <assert.h>
 #include <stdbool.h>
 #include <string.h>
+#ifdef MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#endif
+#ifdef MAJOR_IN_SYSMACROS
 #include <sys/sysmacros.h>
+#endif
 #include <sys/mman.h>
 #include <sys/stat.h>
 #include <unistd.h>