aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-11-23 14:29:58 +0100
committerSimon Ser <contact@emersion.fr>2022-11-24 21:50:28 +0000
commit99134c26b858707ba42851ffe832d53cf27be195 (patch)
tree473e2331fd9fb0b85077bbeeee538a387bd0a46b
parent8a56490229594dc86a12910e1711ab03ae14c6d1 (diff)
render: stop pulling <wlr/backend.h>
Let's just forward-declare struct wlr_backend instead. We need to fixup the Vulkan renderer: it needs makedev(), which got included by chance via <wlr/backend.h> → <wlr/backend/session.h> → <libudev.h>.
-rw-r--r--include/wlr/render/wlr_renderer.h2
-rw-r--r--render/vulkan/vulkan.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/include/wlr/render/wlr_renderer.h b/include/wlr/render/wlr_renderer.h
index c5c6be55..0e08fe24 100644
--- a/include/wlr/render/wlr_renderer.h
+++ b/include/wlr/render/wlr_renderer.h
@@ -11,9 +11,9 @@
#include <stdint.h>
#include <wayland-server-core.h>
-#include <wlr/backend.h>
#include <wlr/render/wlr_texture.h>
+struct wlr_backend;
struct wlr_renderer_impl;
struct wlr_drm_format_set;
struct wlr_buffer;
diff --git a/render/vulkan/vulkan.c b/render/vulkan/vulkan.c
index c964fe12..64d021c2 100644
--- a/render/vulkan/vulkan.c
+++ b/render/vulkan/vulkan.c
@@ -12,6 +12,10 @@
#include <wlr/config.h>
#include "render/vulkan.h"
+#if defined(__linux__)
+#include <sys/sysmacros.h>
+#endif
+
static bool check_extension(const VkExtensionProperties *avail,
uint32_t avail_len, const char *name) {
for (size_t i = 0; i < avail_len; i++) {