examples: fix build.
authorYousong Zhou <yszhou4tech@gmail.com>
Wed, 12 Nov 2014 13:59:16 +0000 (21:59 +0800)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 11 Dec 2014 16:57:19 +0000 (17:57 +0100)
- runqueue-example.c: fix include path for in-tree build.
 - blobmsg-example.c: add inttypes.h for using PRIu64.
 - add examples/ subdirectory to main CMakeLists.txt

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
CMakeLists.txt
examples/blobmsg-example.c
examples/runqueue-example.c

index 4b1570c..ddd5533 100644 (file)
@@ -39,6 +39,7 @@ INSTALL(TARGETS ubox ubox-static
 )
 
 ADD_SUBDIRECTORY(lua)
+ADD_SUBDIRECTORY(examples)
 
 find_library(json NAMES json-c)
 IF(EXISTS ${json})
index 69ddce8..01b0518 100644 (file)
@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include <inttypes.h>
 
 #include "blobmsg.h"
 #include "blobmsg_json.h"
index 1ae184a..13ab864 100644 (file)
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#include <libubox/uloop.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
 
+#include "uloop.h"
 #include "runqueue.h"
 
 static struct runqueue q;