refactor(core): use correct SDL includes
What changed, and why it matters
This commit only changes how the software development library SDL is included in source files for the Unix emulator build. It replaces generic include paths like <SDL.h> with versioned paths like <SDL2/SDL.h> and moves some includes outside a conditional block. There is no security-relevant change to the actual code logic, and no indication this fixes a vulnerability.
No security action required. Treat as a normal build-system/include cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch is a build hygiene refactor for the Trezor Core Unix emulator target. It updates SDL header includes to use the canonical SDL2/ prefix and relocates SDL_blendmode.h and SDL_render.h out of the _GNU_SOURCE guard. No functional code, parsing, memory handling, or cryptographic logic is modified. The commit message is purely a refactor with [no changelog].
Changed components
core/embed/io/display/unix/display_driver.ccore/embed/io/power_manager/unix/power_manager.ccore/embed/sys/task/inc/sys/unix/sdl_event.hInspect captured patch +6 / −6
diff --git a/core/embed/io/display/unix/display_driver.c b/core/embed/io/display/unix/display_driver.c
index f2a5023f..ba47f160 100644
--- a/core/embed/io/display/unix/display_driver.c
+++ b/core/embed/io/display/unix/display_driver.c
@@ -19,8 +19,6 @@
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
-#include "SDL_blendmode.h"
-#include "SDL_render.h"
#endif
#include <trezor_bsp.h>
@@ -32,8 +30,10 @@
#include <sys/logging.h>
#include <sys/systask.h>
-#include <SDL.h>
-#include <SDL_image.h>
+#include <SDL2/SDL.h>
+#include <SDL2/SDL_blendmode.h>
+#include <SDL2/SDL_image.h>
+#include <SDL2/SDL_render.h>
#include "profile.h"
diff --git a/core/embed/io/power_manager/unix/power_manager.c b/core/embed/io/power_manager/unix/power_manager.c
index 9e712806..fe7e10eb 100644
--- a/core/embed/io/power_manager/unix/power_manager.c
+++ b/core/embed/io/power_manager/unix/power_manager.c
@@ -24,7 +24,7 @@
#include <io/unix/sdl_display.h>
#include <SDL.h>
-#include "SDL_events.h"
+#include <SDL2/SDL_events.h>
pm_status_t pm_init(bool inherit_state) { return PM_OK; }
diff --git a/core/embed/sys/task/inc/sys/unix/sdl_event.h b/core/embed/sys/task/inc/sys/unix/sdl_event.h
index 17efa439..ff680903 100644
--- a/core/embed/sys/task/inc/sys/unix/sdl_event.h
+++ b/core/embed/sys/task/inc/sys/unix/sdl_event.h
@@ -21,7 +21,7 @@
#include <trezor_types.h>
-#include "SDL.h"
+#include <SDL2/SDL.h>
// This module provides a modular approach to processing SDL events.
//
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.