From c7016b454010a7248763417c8f1ee687e2d5592f 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 d4c12f2e..b8ad273a 100644 --- a/simulator/CMakeLists.txt +++ b/simulator/CMakeLists.txt @@ -350,6 +350,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} @@ -361,7 +365,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 @@ -403,6 +407,7 @@ target_include_directories(kern_simulator PRIVATE # LVGL ${LVGL_DIR} ${LVGL_DIR}/src + ${SDL2_INCLUDE_DIRS} ) target_compile_definitions(kern_simulator PRIVATE @@ -458,7 +463,7 @@ endif() target_link_libraries(kern_simulator PRIVATE lvgl - SDL2 + ${SDL2_LIBRARIES} Threads::Threads m wally From adde07b1321029032e34490864a2f29c9175f457 Mon Sep 17 00:00:00 2001 From: odudex Date: Fri, 6 Nov 2026 16:29:16 -0300 Subject: [PATCH 2/2] fix(simulator): wipe wally secrets with memset_s on macOS --- simulator/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/simulator/CMakeLists.txt b/simulator/CMakeLists.txt index b8ad273a..b0d36d45 100644 --- a/simulator/CMakeLists.txt +++ b/simulator/CMakeLists.txt @@ -73,6 +73,11 @@ target_compile_definitions(wally PRIVATE ECMULT_WINDOW_SIZE=8 ) +if(APPLE) + # macOS lacks explicit_bzero; wally_internal_bzero() tries memset_s first + target_compile_definitions(wally PRIVATE HAVE_MEMSET_S=1 __STDC_WANT_LIB_EXT1__=1) +endif() + # Changes the public struct layouts, so every user of the headers needs it. target_compile_definitions(wally PUBLIC WALLY_ABI_NO_ELEMENTS)