HTRACE-218. Fix issues with finding json-c includes and librt in the native library (cmccabe)
diff --git a/htrace-c/src/CMakeLists.txt b/htrace-c/src/CMakeLists.txt
index 4240f32..57558a5 100644
--- a/htrace-c/src/CMakeLists.txt
+++ b/htrace-c/src/CMakeLists.txt
@@ -60,7 +60,8 @@
 ENDIF(JSON_C_INCLUDE_DIR AND JSON_C_LIBRARY)
 
 include_directories(${CMAKE_BINARY_DIR}
-                    ${CMAKE_SOURCE_DIR})
+                    ${CMAKE_SOURCE_DIR}
+                    ${JSON_C_INCLUDE_DIR})
 
 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
     set(RAND_SRC "util/rand_linux.c")
@@ -94,6 +95,9 @@
 )
 
 set(DEPS_ALL pthread)
+IF (CMAKE_SYSTEM_NAME MATCHES "Linux")
+  set(DEPS_ALL ${DEPS_ALL} rt)
+ENDIF()
 
 # The unit test version of the library, which exposes all symbols.
 add_library(htrace_test STATIC
diff --git a/htrace-c/src/test/mini_htraced.c b/htrace-c/src/test/mini_htraced.c
index ab9eb08..9a042fe 100644
--- a/htrace-c/src/test/mini_htraced.c
+++ b/htrace-c/src/test/mini_htraced.c
@@ -28,8 +28,8 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <inttypes.h>
-#include <json/json_object.h>
-#include <json/json_tokener.h>
+#include <json_object.h>
+#include <json_tokener.h>
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/htrace-c/src/test/span_util.c b/htrace-c/src/test/span_util.c
index 8a615b1..2069cdc 100644
--- a/htrace-c/src/test/span_util.c
+++ b/htrace-c/src/test/span_util.c
@@ -22,8 +22,8 @@
 #include "util/log.h"
 
 #include <errno.h>
-#include <json/json_object.h>
-#include <json/json_tokener.h>
+#include <json_object.h>
+#include <json_tokener.h>
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>