summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@jsg.id.au>2023-12-18 22:03:23 +1100
committerEric Engestrom <eric@engestrom.ch>2024-01-03 12:03:03 +0000
commitf03eab9efc8cb8cf86e4966736c40ca543fe83ef (patch)
treef4706ee59550a9f4a2cc79f4b5c51d0dd84e1d3c
parentc47c264f4d50b3b0d71bf6b7744d9f48d02c96d5 (diff)
downloadmesa-f03eab9efc8cb8cf86e4966736c40ca543fe83ef.tar.gz
mesa-f03eab9efc8cb8cf86e4966736c40ca543fe83ef.tar.bz2
mesa-f03eab9efc8cb8cf86e4966736c40ca543fe83ef.zip
zink: put sysmacros.h include under #ifdef MAJOR_IN_SYSMACROS
Fixes the build on OpenBSD, where major() is in sys/types and sys/sysmacros.h does not exist. Also include sys/mkdev.h if MAJOR_IN_MKDEV is defined. Fixes: 6d60115be7c ("zink: Fix enumerate devices when running compositor") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26735> (cherry picked from commit 33eecafe757264ed58e33b87e010aacc6a376da8)
-rw-r--r--.pick_status.json2
-rw-r--r--src/gallium/drivers/zink/zink_screen.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/.pick_status.json b/.pick_status.json
index cb50a26ae54..4f697626e3d 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -34,7 +34,7 @@
"description": "zink: put sysmacros.h include under #ifdef MAJOR_IN_SYSMACROS",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": "6d60115be7cce87402f15ba01d81783dbf25f80a",
"notes": null
diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c
index f42f340657b..97af50f68c0 100644
--- a/src/gallium/drivers/zink/zink_screen.c
+++ b/src/gallium/drivers/zink/zink_screen.c
@@ -55,8 +55,13 @@
#include <xf86drm.h>
#include <fcntl.h>
#include <sys/stat.h>
+#ifdef MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#endif
+#ifdef MAJOR_IN_SYSMACROS
#include <sys/sysmacros.h>
#endif
+#endif
static int num_screens = 0;
bool zink_tracing = false;