[OpenWrt-Devel] [PATCH] ubus: Explicitly add _GNU_SOURCE in CMakeList definitions

Hans Dedecker dedeckeh at gmail.com
Fri Sep 12 09:00:26 EDT 2014

Commit b79e808 added O_CLOEXEC marking of ubus socket which requires _GNU_SOURCE define to be set on some systems to avoid compilation issue.

Signed-off-by: Hans Dedecker <dedeckeh at gmail.com>
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index cb2f420..90e0c93 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,7 @@
 cmake_minimum_required(VERSION 2.6)
 PROJECT(ubus C)
-ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations)
+ADD_DEFINITIONS(-Os -D_GNU_SOURCE -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations)
 OPTION(BUILD_LUA "build Lua plugin" ON)
 OPTION(BUILD_EXAMPLES "build examples" ON)
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list