qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Vladimir N. Oleynik" <dzo@simtreas.ru>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] No slirp usage
Date: Thu, 30 Aug 2007 15:50:28 +0400	[thread overview]
Message-ID: <46D6AF04.8060802@simtreas.ru> (raw)

[-- Attachment #1: Type: text/plain, Size: 485 bytes --]

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

[-- Attachment #2: no_slirp.path --]
[-- Type: text/plain, Size: 1149 bytes --]

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	other threads:[~2007-08-30 11:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46D6AF04.8060802@simtreas.ru \
    --to=dzo@simtreas.ru \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).