From 9dfa26e0ecef81ffbe3c6e5edbc9e18f5cdb62e5 Mon Sep 17 00:00:00 2001 From: Vladimir Timofeev Date: Thu, 20 Nov 2014 23:20:02 +0300 Subject: [PATCH] Quick and dirty fix after my error. This defines fix build on linux with fresh gcc, but broke on mac --- cocos/scripting/lua-bindings/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cocos/scripting/lua-bindings/CMakeLists.txt b/cocos/scripting/lua-bindings/CMakeLists.txt index 5b00b863c9..22084d136f 100644 --- a/cocos/scripting/lua-bindings/CMakeLists.txt +++ b/cocos/scripting/lua-bindings/CMakeLists.txt @@ -56,7 +56,9 @@ if(WINDOWS) ${cocos_root}/external/lua/luasocket/wsocket.c ) elseif(UNIX) - add_definitions(-D_POSIX_C_SOURCE=200809L -D_DEFAULT_SOURCE) + if(LINUX) + add_definitions(-D_POSIX_C_SOURCE=200809L -D_DEFAULT_SOURCE) + endif() list(APPEND lua_cocos2d_source_files ${cocos_root}/external/lua/luasocket/serial.c ${cocos_root}/external/lua/luasocket/unix.c