Mesa (main): radv: use MAJOR_IN_SYSMACROS for sysmacros.h include

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Feb 26 01:37:24 UTC 2022


Module: Mesa
Branch: main
Commit: f0398180a592e12eefc58e9580d7c0d71fbae450
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f0398180a592e12eefc58e9580d7c0d71fbae450

Author: Jonathan Gray <jsg at jsg.id.au>
Date:   Wed Oct 20 12:41:12 2021 +1100

radv: use MAJOR_IN_SYSMACROS for sysmacros.h include

fixes build on OpenBSD
../src/amd/vulkan/radv_device.c:35:10: fatal error: 'sys/sysmacros.h' file not found

Fixes: 7aaa54feb53 ("radv: implement VK_EXT_physical_device_drm")
Signed-off-by: Jonathan Gray <jsg at jsg.id.au>
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13448>

---

 src/amd/vulkan/radv_device.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 4de92115c15..3a8dd394a63 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -31,7 +31,11 @@
 
 #ifdef __FreeBSD__
 #include <sys/types.h>
-#elif !defined(_WIN32)
+#endif
+#ifdef MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#endif
+#ifdef MAJOR_IN_SYSMACROS
 #include <sys/sysmacros.h>
 #endif
 



More information about the mesa-commit mailing list