Skip to content

Commit

Permalink
kmsdrm: Fix Vulkan type redefinition errors from commit 24ed947
Browse files Browse the repository at this point in the history
  • Loading branch information
Kontrabant committed Dec 6, 2024
1 parent c49f4ce commit 2e5208f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
1 change: 0 additions & 1 deletion src/video/kmsdrm/SDL_kmsdrmopengles.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#ifndef SDL_kmsdrmopengles_h_
#define SDL_kmsdrmopengles_h_

#include "../SDL_sysvideo.h"
#include "../SDL_egl_c.h"

// OpenGLES functions
Expand Down
14 changes: 6 additions & 8 deletions src/video/kmsdrm/SDL_kmsdrmvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,11 @@

#ifdef SDL_VIDEO_DRIVER_KMSDRM

/* Include this before SDL_kmsdrmvulkan.h, as the Vulkan header can pull in
* Wayland headers, which pull in EGL headers with EGL types defined as Wayland
* types, which causes warnings when building with strict-aliasing and LTO.
/* Include this first, as some system headers may pull in EGL headers that
* define EGL types as native types for other enabled platforms, which can
* result in type-mismatch warnings when building with LTO.
*/
#include "SDL_kmsdrmopengles.h"

/* include this here before SDL_sysvideo.h to avoid vulkan type
* redefinition errors. it already includes SDL_sysvideo.h. */
#include "SDL_kmsdrmvulkan.h"
#include "../SDL_egl_c.h"

// SDL internals
#include "../../events/SDL_events_c.h"
Expand All @@ -49,6 +45,8 @@
#include "SDL_kmsdrmevents.h"
#include "SDL_kmsdrmmouse.h"
#include "SDL_kmsdrmvideo.h"
#include "SDL_kmsdrmopengles.h"
#include "SDL_kmsdrmvulkan.h"
#include <dirent.h>
#include <errno.h>
#include <poll.h>
Expand Down
3 changes: 1 addition & 2 deletions src/video/kmsdrm/SDL_kmsdrmvulkan.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
#ifndef SDL_kmsdrm_vulkan_h_
#define SDL_kmsdrm_vulkan_h_

#include "../SDL_vulkan_internal.h"
#include "../SDL_sysvideo.h"
#include <SDL3/SDL_vulkan.h>

#if defined(SDL_VIDEO_VULKAN) && defined(SDL_VIDEO_DRIVER_KMSDRM)

Expand Down

0 comments on commit 2e5208f

Please sign in to comment.