build: remove "implicit declaration of function" warnings 09/20009/1
authorSeokYeon Hwang <syeon.hwang@samsung.com>
Thu, 24 Apr 2014 11:27:02 +0000 (20:27 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Thu, 24 Apr 2014 11:27:02 +0000 (20:27 +0900)
Change-Id: Iab0442523bad977a72834947753e9c47ba52f54f
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
target-i386/hax-all.c
tizen/distrib/protobuf/protobuf-c.c
tizen/src/ecs/ecs_msg.c
tizen/src/sdb.c

index e338136..9b9449f 100644 (file)
@@ -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;
index a90484e..d8d41b9 100644 (file)
 //#include <malloc.h>
 //#endif
 
+// to use "alloca()" in Windows.
+#ifdef __WIN32
+#include <malloc.h>
+#endif
+
 #ifndef PRINT_UNPACK_ERRORS
 #define PRINT_UNPACK_ERRORS              1
 #endif
index d0c09f0..d0f7b85 100644 (file)
@@ -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));
index cd4602d..b4cbb46 100644 (file)
@@ -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;