examples: fix build.

- 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>
This commit is contained in:
Yousong Zhou 2014-11-12 21:59:16 +08:00 committed by Felix Fietkau
parent c5d80836cd
commit 8cc3903383
3 changed files with 3 additions and 1 deletions

View 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})

View file

@ -1,4 +1,5 @@
#include <stdio.h>
#include <inttypes.h>
#include "blobmsg.h"
#include "blobmsg_json.h"

View file

@ -16,11 +16,11 @@
* 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;