From 9b228148f554f0ab6d1a5fb3bfeed81ce48419a8 Mon Sep 17 00:00:00 2001 From: Richard Dale Date: Wed, 17 Jun 2015 10:52:52 +0000 Subject: Fix build --- CMakeLists.txt | 4 +++- handler.c | 2 +- 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); -- cgit v1.2.1