Skip to content

Commit b2f3ffe

Browse files
est31Zeno-
authored andcommittedFeb 12, 2015
Enable LUA_USE_POSIX if possible in bundled Lua
Fixes warning: src/lua/src/loslib.c:60: Warning: the use of `tmpnam' is dangerous, better use `mkstemp'
1 parent 66efaaa commit b2f3ffe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

Diff for: ‎src/lua/CMakeLists.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@ else()
4747
endif()
4848
mark_as_advanced(LUA_USE_DLOPEN)
4949

50-
if(DEFAULT_POSIX)
51-
else()
52-
endif()
53-
5450
if(DEFAULT_ANSI)
5551
option(LUA_ANSI "Disable non-ansi features." ON)
5652
else()
@@ -87,6 +83,10 @@ if(LUA_USE_DLOPEN)
8783
endif(NOT APPLE)
8884
endif(LUA_USE_DLOPEN)
8985

86+
if(DEFAULT_POSIX)
87+
set(COMMON_CFLAGS "${COMMON_CFLAGS} -DLUA_USE_POSIX")
88+
endif(DEFAULT_POSIX)
89+
9090
if(LUA_ANSI)
9191
set(COMMON_CFLAGS "${COMMON_CFLAGS} -DLUA_ANSI")
9292
endif(LUA_ANSI)

0 commit comments

Comments
 (0)