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 4b1570c41e07d5300ed22325ade265b2141c6cb4..ddd5533fa137e16979dedbddab56556644e4ce07 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 69ddce896059da62a20e52c46bb691fb584e35e6..01b05181ebc8704491c7cd70617f94e76c66df80 100644 (file)
@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include <inttypes.h>
 
 #include "blobmsg.h"
 #include "blobmsg_json.h"
index 1ae184a9b0d3107c4c374663c905f109d6a29780..13ab864e8671fdd412a062d60bcb1b5c6a188638 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;