Signed-off-by: munkyu.im <munkyu.im@samsung.com>
int read = 0;
int to_read_bytes = 0;
- if (ioctl(cli->client_fd, FIONREAD, &to_read_bytes) < 0)
- {
- LOG("ioctl failed");
- return;
- }
+
+#ifndef __WIN32
+ if (ioctl(cli->client_fd, FIONREAD, &to_read_bytes) < 0)
+ {
+ LOG("ioctl failed");
+ return;
+ }
+
+#else
+ unsigned long to_read_bytes_long = 0;
+ if (ioctlsocket(cli->client_fd, FIONREAD, &to_read_bytes_long) < 0)
+ {
+ LOG("ioctl failed");
+ return;
+ }
+ to_read_bytes = (int)to_read_bytes_long;
+#endif
LOG("ioctl FIONREAD: %d\n", to_read_bytes);
if (to_read_bytes == 0)
g_strlcpy(dns, DEFAULT_QEMU_DNS_IP, strlen(DEFAULT_QEMU_DNS_IP) + 1);
check_vm_lock();
- socket_init();
make_vm_lock();
sdb_setup(); /* determine the base port for emulator */
}
fprintf(stdout, "\nskin args: =========================================\n");
+ INFO("socket initialize\n");
+ socket_init();
+
INFO("qemu main start!\n");
qemu_main(_qemu_argc, _qemu_argv, NULL);