Mesa (staging/22.0): radv: use MAJOR_IN_SYSMACROS for sysmacros.h include

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Mar 3 20:11:33 UTC 2022


Module: Mesa
Branch: staging/22.0
Commit: 711b82e6aedb4e552c1b3836b1c33407165b4fc4
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=711b82e6aedb4e552c1b3836b1c33407165b4fc4

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>
(cherry picked from commit f0398180a592e12eefc58e9580d7c0d71fbae450)

---

 .pick_status.json            | 2 +-
 src/amd/vulkan/radv_device.c | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index e936a08d5b9..987df7fce0b 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1273,7 +1273,7 @@
         "description": "radv: use MAJOR_IN_SYSMACROS for sysmacros.h include",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "7aaa54feb53a9d0cf3277bef31547312ee56b277"
     },
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index ecdf57fc64a..b078ac6217d 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