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 e33813621928ed4ccfe3fc255b94c1b32271d3f2..9b9449f2aeece027bd590b8e646e79c6bc994eb7 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 a90484ea6a4634918590cf7a7a879233fe908c4a..d8d41b93057ec9a271bffcb601f7a6d2e329f3ab 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 d0c09f0e8a9b70ae9ae62d4f473f8d8d5ae4f30a..d0f7b85fc676428974e1cffee73ac85d7e4ff423 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 cd4602d70fa0073ee73206928930a6d8b5bbd2c1..b4cbb4687f62b3f256d295ae4c51e0013da2f425 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;