Skip to content

Commit 80437d8

Browse files
committed
Add LUA_USE_C89 for Dreamcast to avoid POSIX calls in Lua
KOS newlib does not support popen, system, or tmpfile. Without LUA_USE_C89, Lua's os library tries to register wrappers for these functions, which can leave the os table nil and crash with "attempt to index a nil value" during sandbox creation. Signed-off-by: Panagiotis Georgiadis <pgeorgia@redhat.com>
1 parent 7a5603b commit 80437d8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

3rdParty/Lua/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ elseif(TARGET_PLATFORM STREQUAL "dos")
3030
target_compile_definitions(lua_static PUBLIC -DLUA_USE_C89)
3131
elseif(ANDROID AND ("${ANDROID_ABI}" STREQUAL "armeabi-v7a" OR "${ANDROID_ABI}" STREQUAL "x86"))
3232
target_compile_definitions(lua_static PUBLIC -DLUA_USE_C89)
33-
elseif(NINTENDO_3DS OR VITA OR NINTENDO_SWITCH OR NXDK)
33+
elseif(NINTENDO_3DS OR VITA OR NINTENDO_SWITCH OR NXDK OR DREAMCAST)
3434
target_compile_definitions(lua_static PUBLIC -DLUA_USE_C89)
3535
elseif(IOS)
3636
target_compile_definitions(lua_static PUBLIC -DLUA_USE_IOS)

0 commit comments

Comments
 (0)