ソースを参照

wayland: Fix build when not using the shared Wayland libraries

Explicitly include the Wayland protocol headers when statically linking against the Wayland libraries or older system headers might be used instead of the local versions.
Frank Praznik 2 年 前
コミット
836eb22442
1 ファイル変更7 行追加0 行削除
  1. 7 0
      src/video/wayland/SDL_waylanddyn.h

+ 7 - 0
src/video/wayland/SDL_waylanddyn.h

@@ -166,6 +166,13 @@ void SDL_WAYLAND_UnloadSymbols(void);
 
 
 #else /* SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC */
 #else /* SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC */
 
 
+/*
+ * These must be included before libdecor.h, otherwise the libdecor header
+ * pulls in the system Wayland protocol headers instead of ours.
+ */
+#include "wayland-client-protocol.h"
+#include "wayland-egl.h"
+
 #ifdef HAVE_LIBDECOR_H
 #ifdef HAVE_LIBDECOR_H
 #include <libdecor.h>
 #include <libdecor.h>
 #endif
 #endif