Only build qemu_egl_init_surface_x11 for GTK
authorMateusz Majewski <m.majewski2@samsung.com>
Tue, 25 Mar 2025 12:08:06 +0000 (13:08 +0100)
committerMateusz Majewski <m.majewski2@samsung.com>
Tue, 25 Mar 2025 14:15:39 +0000 (15:15 +0100)
This function is used only by GTK in this QEMU version. The function
causes issues for us, because it depends on the Window type, which is an
X11-specific EGL alias. Therefore, the signature as is causes a build
error on all non-Linux platforms. We could #define this type away, but
since the function is not used anyway, it is probably better to not care
about it at all.

Change-Id: I122e6976de88760bcaa762daa70e93e6162edc18

include/ui/egl-helpers.h
ui/egl-helpers.c

index 03fcf4bba2663256681fd8ef6075c2732525e819..7eaa75e11285d09e02d04ba86da06d6bbf5fc198 100644 (file)
@@ -20,8 +20,12 @@ int egl_get_fd_for_texture(uint32_t tex_id, EGLint *stride, EGLint *fourcc);
 
 #endif
 
+#ifdef CONFIG_GTK
+
 EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, Window win);
 
+#endif
+
 int qemu_egl_init_dpy(EGLNativeDisplayType dpy, bool gles, bool debug);
 EGLContext qemu_egl_init_ctx(void);
 
index 79cee0503a4c00f5e51eb5077ae9137c4f7482e0..990bc4939aedd802d79d567235c09e07efba5904 100644 (file)
@@ -146,6 +146,8 @@ int egl_get_fd_for_texture(uint32_t tex_id, EGLint *stride, EGLint *fourcc)
 
 /* ---------------------------------------------------------------------- */
 
+#ifdef CONFIG_GTK
+
 EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, Window win)
 {
     EGLSurface esurface;
@@ -170,6 +172,8 @@ EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, Window win)
     return esurface;
 }
 
+#endif /* CONFIG_GTK */
+
 /* ---------------------------------------------------------------------- */
 
 int qemu_egl_init_dpy(EGLNativeDisplayType dpy, bool gles, bool debug)