From 7c15c43d34c8c6aef8c65aacf9d3236fd9c8695a Mon Sep 17 00:00:00 2001 From: SeokYeon Hwang Date: Thu, 24 Apr 2014 20:27:02 +0900 Subject: [PATCH] build: remove "implicit declaration of function" warnings Change-Id: Iab0442523bad977a72834947753e9c47ba52f54f Signed-off-by: SeokYeon Hwang --- target-i386/hax-all.c | 2 ++ tizen/distrib/protobuf/protobuf-c.c | 5 +++++ tizen/src/ecs/ecs_msg.c | 2 +- tizen/src/sdb.c | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/target-i386/hax-all.c b/target-i386/hax-all.c index e338136..9b9449f 100644 --- a/target-i386/hax-all.c +++ b/target-i386/hax-all.c @@ -369,6 +369,8 @@ hax_region_del(MemoryListener *listener, MemoryRegionSection *section) /* currently we fake the dirty bitmap sync, always dirty */ +// avoid implicit declaration warning on Windows +int ffsl(long value); static void hax_log_sync(MemoryListener *listener, MemoryRegionSection *section) { MemoryRegion *mr = section->mr; diff --git a/tizen/distrib/protobuf/protobuf-c.c b/tizen/distrib/protobuf/protobuf-c.c index a90484e..d8d41b9 100644 --- a/tizen/distrib/protobuf/protobuf-c.c +++ b/tizen/distrib/protobuf/protobuf-c.c @@ -43,6 +43,11 @@ //#include //#endif +// to use "alloca()" in Windows. +#ifdef __WIN32 +#include +#endif + #ifndef PRINT_UNPACK_ERRORS #define PRINT_UNPACK_ERRORS 1 #endif diff --git a/tizen/src/ecs/ecs_msg.c b/tizen/src/ecs/ecs_msg.c index d0c09f0..d0f7b85 100644 --- a/tizen/src/ecs/ecs_msg.c +++ b/tizen/src/ecs/ecs_msg.c @@ -839,7 +839,7 @@ static void handle_sdcard(char* dataBuf, size_t dataLen) if(dataLen > 3 && sdcard_img_name != NULL){ char* pLinechange = strchr(sdcard_img_name, '\n'); if(pLinechange != NULL){ - sdcard_img_name = strndup(sdcard_img_name, pLinechange - sdcard_img_name); + sdcard_img_name = g_strndup(sdcard_img_name, pLinechange - sdcard_img_name); } g_strlcat(sdcard_img_path, sdcard_img_name, sizeof(sdcard_img_path)); diff --git a/tizen/src/sdb.c b/tizen/src/sdb.c index cd4602d..b4cbb46 100644 --- a/tizen/src/sdb.c +++ b/tizen/src/sdb.c @@ -25,6 +25,8 @@ extern char tizen_target_path[]; #ifdef _WIN32 +#include "qemu/main-loop.h" + static void socket_close_handler( void* _fd ) { int fd = (int)_fd; -- 2.7.4