From 012a1524060ccaf86d9a888d61f0f40c293320d1 Mon Sep 17 00:00:00 2001 From: Vladimir Timofeev Date: Thu, 20 Nov 2014 13:49:59 +0300 Subject: [PATCH] Fix build of luasocket on linux --- cocos/scripting/lua-bindings/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/cocos/scripting/lua-bindings/CMakeLists.txt b/cocos/scripting/lua-bindings/CMakeLists.txt index 0b1cf50ca8..5b00b863c9 100644 --- a/cocos/scripting/lua-bindings/CMakeLists.txt +++ b/cocos/scripting/lua-bindings/CMakeLists.txt @@ -56,6 +56,7 @@ if(WINDOWS) ${cocos_root}/external/lua/luasocket/wsocket.c ) elseif(UNIX) + add_definitions(-D_POSIX_C_SOURCE=200809L -D_DEFAULT_SOURCE) list(APPEND lua_cocos2d_source_files ${cocos_root}/external/lua/luasocket/serial.c ${cocos_root}/external/lua/luasocket/unix.c