summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Dale <richard.dale@codethink.co.uk>2015-06-17 10:52:52 +0000
committerRichard Dale <richard.dale@codethink.co.uk>2015-06-17 10:57:58 +0000
commit9b228148f554f0ab6d1a5fb3bfeed81ce48419a8 (patch)
tree1239ac9f3022a995ac6dc066be73c6484b89021e
parent5cf30b59baa03db2448570c78e7e92873555d2ec (diff)
downloadnetifd-baserock/fix-build.tar.gz
-rw-r--r--CMakeLists.txt4
-rw-r--r--handler.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 85527be..72d47a0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,10 +1,12 @@
cmake_minimum_required(VERSION 2.6)
PROJECT(netifd C)
-ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -Wmissing-declarations)
+ADD_DEFINITIONS(-Os -Wall --std=gnu99 -Wmissing-declarations)
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
+INCLUDE_DIRECTORIES(${LIBNL_INCLUDE_DIRS})
+
IF(APPLE)
INCLUDE_DIRECTORIES(/opt/local/include)
LINK_DIRECTORIES(/opt/local/lib)
diff --git a/handler.c b/handler.c
index f81a7c5..155eab0 100644
--- a/handler.c
+++ b/handler.c
@@ -105,7 +105,7 @@ netifd_parse_script_handler(const char *name, script_dump_cb cb)
tok = json_tokener_new();
obj = json_tokener_parse_ex(tok, start, len);
- if (!is_error(obj)) {
+ if (!json_object_is_type(obj, json_type_null)) {
netifd_init_script_handler(name, obj, cb);
json_object_put(obj);
json_tokener_free(tok);