qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] No slirp usage


From: Vladimir N. Oleynik
Subject: [Qemu-devel] No slirp usage
Date: Thu, 30 Aug 2007 15:50:28 +0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060914 SeaMonkey/1.0.5

Hi.
If I compiling without SLIRP then compiler produced warnings:

vl.c: In function `parse_host_port':
vl.c: warning: implicit declaration of function `inet_aton'
vl.c: In function `net_socket_mcast_create':
vl.c: warning: implicit declaration of function `inet_ntoa'

Patch attached.
comment: removed lines from libslirp.h duplicated from slirp.h.


PS: if you interested new my nosdl.c hack, this updated
for fresh qemu-devel ftp://ftp.simtreas.ru/pub/my/qemu/nosdl.c.gz


--w
vodz
diff -rbu qemu.orig/slirp/libslirp.h qemu/slirp/libslirp.h
--- qemu.orig/slirp/libslirp.h  2006-05-01 01:34:14.000000000 +0400
+++ qemu/slirp/libslirp.h       2007-08-30 15:20:06.000000000 +0400
@@ -1,14 +1,6 @@
 #ifndef _LIBSLIRP_H
 #define _LIBSLIRP_H
 
-#ifdef _WIN32
-#include <winsock2.h>
-int inet_aton(const char *cp, struct in_addr *ia);
-#else
-#include <sys/select.h>
-#include <arpa/inet.h>
-#endif
-
 #ifdef __cplusplus
 extern "C" {
 #endif
diff -rbu qemu.orig/vl.c qemu/vl.c
--- qemu.orig/vl.c      2007-08-30 15:17:38.000000000 +0400
+++ qemu/vl.c   2007-08-30 15:24:46.000000000 +0400
@@ -42,6 +42,8 @@
 #include <netinet/in.h>
 #include <dirent.h>
 #include <netdb.h>
+#include <sys/select.h>
+#include <arpa/inet.h>
 #ifdef _BSD
 #include <sys/stat.h>
 #ifndef __APPLE__
@@ -63,7 +65,6 @@
 #include <sys/stat.h>
 #include <sys/ethernet.h>
 #include <sys/sockio.h>
-#include <arpa/inet.h>
 #include <netinet/arp.h>
 #include <netinet/in.h>
 #include <netinet/in_systm.h>
@@ -76,6 +77,9 @@
 #include <stropts.h>
 #endif
 #endif
+#else
+#include <winsock2.h>
+int inet_aton(const char *cp, struct in_addr *ia);
 #endif
 
 #if defined(CONFIG_SLIRP)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]