diff --git a/src/video/wayland/SDL_waylandsym.h b/src/video/wayland/SDL_waylandsym.h index b5a51c9e7c..90dcc07a06 100644 --- a/src/video/wayland/SDL_waylandsym.h +++ b/src/video/wayland/SDL_waylandsym.h @@ -174,11 +174,19 @@ SDL_WAYLAND_SYM(xkb_mod_mask_t, xkb_keymap_mod_get_mask, (struct xkb_keymap *, c #ifdef HAVE_LIBDECOR_H SDL_WAYLAND_MODULE(WAYLAND_LIBDECOR) + +#if defined(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR) || SDL_LIBDECOR_CHECK_VERSION(0, 3, 0) +#define SDL_libdecor_constsince03 const +#else +#define SDL_libdecor_constsince03 /* nothing */ +#endif + SDL_WAYLAND_SYM(void, libdecor_unref, (struct libdecor *)) -SDL_WAYLAND_SYM(struct libdecor *, libdecor_new, (struct wl_display *, const struct libdecor_interface *)) +SDL_WAYLAND_SYM(struct libdecor *, libdecor_new, (struct wl_display *,\ + SDL_libdecor_constsince03 struct libdecor_interface *)) SDL_WAYLAND_SYM(struct libdecor_frame *, libdecor_decorate, (struct libdecor *,\ struct wl_surface *,\ - const struct libdecor_frame_interface *,\ + SDL_libdecor_constsince03 struct libdecor_frame_interface *,\ void *)) SDL_WAYLAND_SYM(void, libdecor_frame_unref, (struct libdecor_frame *)) SDL_WAYLAND_SYM(void, libdecor_frame_set_title, (struct libdecor_frame *, const char *)) @@ -244,6 +252,8 @@ SDL_WAYLAND_SYM_OPT(void, libdecor_frame_get_max_content_size, (const struct lib SDL_WAYLAND_SYM_OPT(enum libdecor_wm_capabilities, libdecor_frame_get_wm_capabilities, (struct libdecor_frame *)) #endif +#undef SDL_libdecor_constsince03 + #endif #undef SDL_WAYLAND_MODULE