tethering: fixed compilation error on Windows. 50/13050/1
authorKitae Kim <kt920.kim@samsung.com>
Wed, 27 Nov 2013 08:00:27 +0000 (17:00 +0900)
committerKitae Kim <kt920.kim@samsung.com>
Wed, 27 Nov 2013 08:00:27 +0000 (17:00 +0900)
EISCONN is not defined on MinGW and others things.

Change-Id: Ic775f355ffcb75481f89de1baa58dbe36f213cce
Signed-off-by: Kitae Kim <kt920.kim@samsung.com>
tizen/src/tethering/app_tethering.c

index fb2e656..46dcf16 100644 (file)
  * - S-Core Co., Ltd
  *
  */
+#ifndef __WIN32
 #include <sys/ioctl.h>
+#else
+#define EISCONN        WSAEISCONN
+#endif
 
 #include "qemu-common.h"
 #include "qemu/main-loop.h"
@@ -764,7 +768,7 @@ static void tethering_io_handler(void *opaque)
     }
 #else
     unsigned long to_read_bytes_long = 0;
-    ret = ioctlsocket(tethering_sock. FIONREAD, &to_read_bytes_long);
+    ret = ioctlsocket(tethering_sock, FIONREAD, &to_read_bytes_long);
     if (ret < 0) {
     }
     to_read_bytes = (int)to_read_bytes_long;
@@ -884,7 +888,7 @@ static int start_tethering_socket(int port)
 
     set_tethering_connection_status(CONNECTING);
     do {
-        if (connect(sock, &addr, sizeof(addr)) < 0) {
+        if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
             INFO("tethering socket is connecting.\n");
             ret = -socket_error();
         } else {