From 9b6887401679e6a570e48db56559f1624f0f2c04 Mon Sep 17 00:00:00 2001 From: Subinita Ray Date: Wed, 14 Oct 2026 06:40:13 +0530 Subject: [PATCH 1/2] fix(simulator): find SDL2 through its CMake package variables --- simulator/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/simulator/CMakeLists.txt b/simulator/CMakeLists.txt index 7847a208..da1d4f7d 100644 --- a/simulator/CMakeLists.txt +++ b/simulator/CMakeLists.txt @@ -365,6 +365,10 @@ set_target_properties(lvgl PROPERTIES POSITION_INDEPENDENT_CODE ON) target_include_directories(lvgl PUBLIC ${LVGL_DIR} ${LVGL_DIR}/src + # Debian's libsdl2-dev drops headers straight under /usr/include (already + # a default search path), but Homebrew's puts them under a non-default + # prefix; SDL2_INCLUDE_DIRS covers both without changing the Linux path. + ${SDL2_INCLUDE_DIRS} ) target_include_directories(lvgl PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} @@ -376,7 +380,7 @@ target_compile_definitions(lvgl PRIVATE lv_refr_now=kern_lv_refr_now_real ) target_link_libraries(lvgl PUBLIC - SDL2 + ${SDL2_LIBRARIES} ) add_executable(kern_simulator @@ -418,6 +422,7 @@ target_include_directories(kern_simulator PRIVATE # LVGL ${LVGL_DIR} ${LVGL_DIR}/src + ${SDL2_INCLUDE_DIRS} ) target_compile_definitions(kern_simulator PRIVATE @@ -472,7 +477,7 @@ endif() target_link_libraries(kern_simulator PRIVATE lvgl - SDL2 + ${SDL2_LIBRARIES} Threads::Threads m wally From bec159a2f12e308f322f5a428ab0adafee54d6d8 Mon Sep 17 00:00:00 2001 From: Subinita Ray Date: Wed, 14 Oct 2026 06:40:13 +0530 Subject: [PATCH 2/2] fix(wally): wipe with memset_s on macOS, which lacks explicit_bzero --- components/libwally-core/config.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/libwally-core/config.h b/components/libwally-core/config.h index f9b4696a..45ca34b8 100644 --- a/components/libwally-core/config.h +++ b/components/libwally-core/config.h @@ -20,7 +20,9 @@ /* #undef HAVE_DLFCN_H */ /* Define to 1 if you have the `explicit_bzero' function. */ +#ifndef __APPLE__ #define HAVE_EXPLICIT_BZERO 1 +#endif /* Define to 1 if you have the `explicit_memset' function. */ /* #undef HAVE_EXPLICIT_MEMSET */ @@ -35,7 +37,10 @@ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `memset_s' function. */ -/* #undef HAVE_MEMSET_S */ +/* macOS has no explicit_bzero; memset_s is its non-elidable wipe. */ +#ifdef __APPLE__ +#define HAVE_MEMSET_S 1 +#endif /* Define if we have mmap */ /* #undef HAVE_MMAP */