From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MLZmZ-0000JX-Pe for qemu-devel@nongnu.org; Tue, 30 Jun 2009 05:37:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MLZmU-0000FH-2K for qemu-devel@nongnu.org; Tue, 30 Jun 2009 05:37:43 -0400 Received: from [199.232.76.173] (port=34364 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MLZmT-0000FD-Qc for qemu-devel@nongnu.org; Tue, 30 Jun 2009 05:37:37 -0400 Received: from wa4ehsobe005.messaging.microsoft.com ([216.32.181.15]:40293 helo=WA4EHSOBE005.bigfish.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.60) (envelope-from ) id 1MLZmT-0003mN-6d for qemu-devel@nongnu.org; Tue, 30 Jun 2009 05:37:37 -0400 Received: from mail214-wa4 (localhost.localdomain [127.0.0.1]) by mail214-wa4-R.bigfish.com (Postfix) with ESMTP id 7E7DB870136 for ; Tue, 30 Jun 2009 09:37:29 +0000 (UTC) Received: from svlb1extmailp02.amd.com (unknown [139.95.251.11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail214-wa4.bigfish.com (Postfix) with ESMTP id 800A8FC0059 for ; Tue, 30 Jun 2009 09:37:27 +0000 (UTC) Received: from svlb1twp02.amd.com ([139.95.250.35]) by svlb1extmailp02.amd.com (Switch-3.2.7/Switch-3.2.7) with ESMTP id n5U9bMsk027001 for ; Tue, 30 Jun 2009 02:37:25 -0700 Received: from SSVLEXBH1.amd.com (ssvlexbh1.amd.com [139.95.53.182]) by svlb1twp02.amd.com (Tumbleweed MailGate 3.5.1) with ESMTP id 2D4201103BF for ; Tue, 30 Jun 2009 02:37:08 -0700 (PDT) From: Christoph Egger Date: Tue, 30 Jun 2009 11:37:08 +0200 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_EzdSKPBwlTcPWfl" Message-ID: <200906301137.08588.Christoph.Egger@amd.com> Subject: [Qemu-devel] [PATCH] build fix: Make slirp build on NetBSD List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --Boundary-00=_EzdSKPBwlTcPWfl Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi! slirp fails to build on NetBSD with these errors: In file included from /data/qemu/qemu-git/slirp/tcp_var.h:37, from /data/qemu/qemu-git/slirp/tcp.h:72, from /data/qemu/qemu-git/slirp/slirp.h:192, from slirp/cksum.c:33: /data/qemu/qemu-git/slirp/tcp_timer.h:123: error: expected '=', ',', ';', 'asm' or '_ _attribute__' before numeric constant /data/qemu/qemu-git/slirp/tcp_timer.h:124: error: expected '=', ',', ';', 'asm' or '_ _attribute__' before numeric constant /data/qemu/qemu-git/slirp/tcp_timer.h:125: error: expected '=', ',', ';', 'asm' or '_ _attribute__' before numeric constant In file included from /data/qemu/qemu-git/slirp/slirp.h:196, from slirp/cksum.c:33: /data/qemu/qemu-git/slirp/udp.h:76: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant /data/qemu/qemu-git/slirp/udp.h:77: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant /data/qemu/qemu-git/slirp/udp.h:78: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant /data/qemu/qemu-git/slirp/udp.h:79: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant /data/qemu/qemu-git/slirp/udp.h:80: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant /data/qemu/qemu-git/slirp/udp.h:81: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant In file included from /data/qemu/qemu-git/slirp/slirp.h:197, from slirp/cksum.c:33: /data/qemu/qemu-git/slirp/mbuf.h:118: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant /data/qemu/qemu-git/slirp/mbuf.h:119: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant /data/qemu/qemu-git/slirp/mbuf.h:120: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant /data/qemu/qemu-git/slirp/mbuf.h:121: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant /data/qemu/qemu-git/slirp/mbuf.h:122: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant /data/qemu/qemu-git/slirp/mbuf.h:123: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant /data/qemu/qemu-git/slirp/mbuf.h:124: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant /data/qemu/qemu-git/slirp/mbuf.h:125: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant Attached patch makes slirp build. Signed-off-by: Christoph Egger -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 --Boundary-00=_EzdSKPBwlTcPWfl Content-Type: text/x-diff; charset="us-ascii"; name="qemu_slirp.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="qemu_slirp.diff" diff --git a/slirp/ip_icmp.h b/slirp/ip_icmp.h index 0330131..f61dc1d 100644 --- a/slirp/ip_icmp.h +++ b/slirp/ip_icmp.h @@ -153,9 +153,9 @@ struct icmp { (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \ (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY) -void icmp_input _P((struct mbuf *, int)); +void icmp_input (struct mbuf *, int); void icmp_error(struct mbuf *msrc, u_char type, u_char code, int minsize, const char *message); -void icmp_reflect _P((struct mbuf *)); +void icmp_reflect (struct mbuf *); #endif diff --git a/slirp/mbuf.h b/slirp/mbuf.h index 99fca43..c08dd30 100644 --- a/slirp/mbuf.h +++ b/slirp/mbuf.h @@ -115,13 +115,13 @@ struct mbuf { #define M_DOFREE 0x08 /* when m_free is called on the mbuf, free() * it rather than putting it on the free list */ -void m_init _P((Slirp *)); -struct mbuf * m_get _P((Slirp *)); -void m_free _P((struct mbuf *)); -void m_cat _P((register struct mbuf *, register struct mbuf *)); -void m_inc _P((struct mbuf *, int)); -void m_adj _P((struct mbuf *, int)); -int m_copy _P((struct mbuf *, struct mbuf *, int, int)); -struct mbuf * dtom _P((Slirp *, void *)); +void m_init (Slirp *); +struct mbuf * m_get (Slirp *); +void m_free (struct mbuf *); +void m_cat (register struct mbuf *, register struct mbuf *); +void m_inc (struct mbuf *, int); +void m_adj (struct mbuf *, int); +int m_copy (struct mbuf *, struct mbuf *, int, int); +struct mbuf * dtom (Slirp *, void *); #endif diff --git a/slirp/misc.h b/slirp/misc.h index e43519d..3925059 100644 --- a/slirp/misc.h +++ b/slirp/misc.h @@ -20,7 +20,7 @@ struct ex_list { char *strdup _P((const char *)); #endif -void do_wait _P((int)); +void do_wait (int); #define EMU_NONE 0x0 @@ -58,20 +58,20 @@ struct emu_t { extern int x_port, x_server, x_display; -int show_x _P((char *, struct socket *)); -void redir_x _P((u_int32_t, int, int, int)); -void slirp_insque _P((void *, void *)); -void slirp_remque _P((void *)); -int add_exec _P((struct ex_list **, int, char *, struct in_addr, int)); -int slirp_openpty _P((int *, int *)); +int show_x (char *, struct socket *); +void redir_x (u_int32_t, int, int, int); +void slirp_insque (void *, void *); +void slirp_remque (void *); +int add_exec (struct ex_list **, int, char *, struct in_addr, int); +int slirp_openpty (int *, int *); int fork_exec(struct socket *so, const char *ex, int do_pty); -void snooze_hup _P((int)); -void snooze _P((void)); -void relay _P((int)); -void add_emu _P((char *)); -void u_sleep _P((int)); -void fd_nonblock _P((int)); -void fd_block _P((int)); -int rsh_exec _P((struct socket *, struct socket *, char *, char *, char *)); +void snooze_hup (int); +void snooze (void); +void relay (int); +void add_emu (char *); +void u_sleep (int); +void fd_nonblock (int); +void fd_block (int); +int rsh_exec (struct socket *, struct socket *, char *, char *, char *); #endif diff --git a/slirp/sbuf.h b/slirp/sbuf.h index a4f1036..e50ccb4 100644 --- a/slirp/sbuf.h +++ b/slirp/sbuf.h @@ -21,10 +21,10 @@ struct sbuf { char *sb_data; /* Actual data */ }; -void sbfree _P((struct sbuf *)); -void sbdrop _P((struct sbuf *, int)); -void sbreserve _P((struct sbuf *, int)); -void sbappend _P((struct socket *, struct mbuf *)); -void sbcopy _P((struct sbuf *, int, int, char *)); +void sbfree (struct sbuf *); +void sbdrop (struct sbuf *, int); +void sbreserve (struct sbuf *, int); +void sbappend (struct socket *, struct mbuf *); +void sbcopy (struct sbuf *, int, int, char *); #endif diff --git a/slirp/slirp.h b/slirp/slirp.h index 920d7a6..ad3e25d 100644 --- a/slirp/slirp.h +++ b/slirp/slirp.h @@ -270,16 +270,16 @@ extern Slirp *slirp_instance; #endif #ifndef FULL_BOLT -void if_start _P((Slirp *)); +void if_start (Slirp *); #else -void if_start _P((struct ttys *)); +void if_start (struct ttys *); #endif #ifdef BAD_SPRINTF # define vsprintf vsprintf_len # define sprintf sprintf_len - extern int vsprintf_len _P((char *, const char *, va_list)); - extern int sprintf_len _P((char *, const char *, ...)); + extern int vsprintf_len (char *, const char *, va_list); + extern int sprintf_len (char *, const char *, ...); #endif #ifdef DECLARE_SPRINTF @@ -301,7 +301,7 @@ void if_start _P((struct ttys *)); long gethostid _P((void)); #endif -void lprint _P((const char *, ...)); +void lprint (const char *, ...); #ifndef _WIN32 #include @@ -316,39 +316,39 @@ void lprint _P((const char *, ...)); int cksum(struct mbuf *m, int len); /* if.c */ -void if_init _P((Slirp *)); -void if_output _P((struct socket *, struct mbuf *)); +void if_init (Slirp *); +void if_output (struct socket *, struct mbuf *); /* ip_input.c */ -void ip_init _P((Slirp *)); -void ip_input _P((struct mbuf *)); -void ip_slowtimo _P((Slirp *)); -void ip_stripoptions _P((register struct mbuf *, struct mbuf *)); +void ip_init (Slirp *); +void ip_input (struct mbuf *); +void ip_slowtimo (Slirp *); +void ip_stripoptions (register struct mbuf *, struct mbuf *); /* ip_output.c */ -int ip_output _P((struct socket *, struct mbuf *)); +int ip_output (struct socket *, struct mbuf *); /* tcp_input.c */ -void tcp_input _P((register struct mbuf *, int, struct socket *)); -int tcp_mss _P((register struct tcpcb *, u_int)); +void tcp_input (register struct mbuf *, int, struct socket *); +int tcp_mss (register struct tcpcb *, u_int); /* tcp_output.c */ -int tcp_output _P((register struct tcpcb *)); -void tcp_setpersist _P((register struct tcpcb *)); +int tcp_output (register struct tcpcb *); +void tcp_setpersist (register struct tcpcb *); /* tcp_subr.c */ -void tcp_init _P((Slirp *)); -void tcp_template _P((struct tcpcb *)); -void tcp_respond _P((struct tcpcb *, register struct tcpiphdr *, register struct mbuf *, tcp_seq, tcp_seq, int)); -struct tcpcb * tcp_newtcpcb _P((struct socket *)); -struct tcpcb * tcp_close _P((register struct tcpcb *)); -void tcp_sockclosed _P((struct tcpcb *)); -int tcp_fconnect _P((struct socket *)); -void tcp_connect _P((struct socket *)); -int tcp_attach _P((struct socket *)); -u_int8_t tcp_tos _P((struct socket *)); -int tcp_emu _P((struct socket *, struct mbuf *)); -int tcp_ctl _P((struct socket *)); +void tcp_init (Slirp *); +void tcp_template (struct tcpcb *); +void tcp_respond (struct tcpcb *, register struct tcpiphdr *, register struct mbuf *, tcp_seq, tcp_seq, int); +struct tcpcb * tcp_newtcpcb (struct socket *); +struct tcpcb * tcp_close (register struct tcpcb *); +void tcp_sockclosed (struct tcpcb *); +int tcp_fconnect (struct socket *); +void tcp_connect (struct socket *); +int tcp_attach (struct socket *); +u_int8_t tcp_tos (struct socket *); +int tcp_emu (struct socket *, struct mbuf *); +int tcp_ctl (struct socket *); struct tcpcb *tcp_drop(struct tcpcb *tp, int err); #ifdef USE_PPP diff --git a/slirp/socket.h b/slirp/socket.h index dcf2743..7b50508 100644 --- a/slirp/socket.h +++ b/slirp/socket.h @@ -74,20 +74,20 @@ struct socket { #define SS_HOSTFWD 0x1000 /* Socket describes host->guest forwarding */ #define SS_INCOMING 0x2000 /* Connection was initiated by a host on the internet */ -struct socket * solookup _P((struct socket *, struct in_addr, u_int, struct in_addr, u_int)); -struct socket * socreate _P((Slirp *)); -void sofree _P((struct socket *)); -int soread _P((struct socket *)); -void sorecvoob _P((struct socket *)); -int sosendoob _P((struct socket *)); -int sowrite _P((struct socket *)); -void sorecvfrom _P((struct socket *)); -int sosendto _P((struct socket *, struct mbuf *)); -struct socket * tcp_listen _P((Slirp *, u_int32_t, u_int, u_int32_t, u_int, - int)); -void soisfconnecting _P((register struct socket *)); -void soisfconnected _P((register struct socket *)); -void sofwdrain _P((struct socket *)); +struct socket * solookup (struct socket *, struct in_addr, u_int, struct in_addr, u_int); +struct socket * socreate (Slirp *); +void sofree (struct socket *); +int soread (struct socket *); +void sorecvoob (struct socket *); +int sosendoob (struct socket *); +int sowrite (struct socket *); +void sorecvfrom (struct socket *); +int sosendto (struct socket *, struct mbuf *); +struct socket * tcp_listen (Slirp *, u_int32_t, u_int, u_int32_t, u_int, + int); +void soisfconnecting (register struct socket *); +void soisfconnected (register struct socket *); +void sofwdrain (struct socket *); struct iovec; /* For win32 */ size_t sopreprbuf(struct socket *so, struct iovec *iov, int *np); int soreadbuf(struct socket *so, const char *buf, int size); diff --git a/slirp/tcp_timer.h b/slirp/tcp_timer.h index cfb06ff..a31148a 100644 --- a/slirp/tcp_timer.h +++ b/slirp/tcp_timer.h @@ -120,8 +120,8 @@ extern const int tcp_backoff[]; struct tcpcb; -void tcp_fasttimo _P((Slirp *)); -void tcp_slowtimo _P((Slirp *)); -void tcp_canceltimers _P((struct tcpcb *)); +void tcp_fasttimo (Slirp *); +void tcp_slowtimo (Slirp *); +void tcp_canceltimers (struct tcpcb *); #endif diff --git a/slirp/udp.h b/slirp/udp.h index cc814a3..f1115ae 100644 --- a/slirp/udp.h +++ b/slirp/udp.h @@ -73,13 +73,13 @@ struct udpiphdr { struct mbuf; -void udp_init _P((Slirp *)); -void udp_input _P((register struct mbuf *, int)); -int udp_output _P((struct socket *, struct mbuf *, struct sockaddr_in *)); -int udp_attach _P((struct socket *)); -void udp_detach _P((struct socket *)); -struct socket * udp_listen _P((Slirp *, u_int32_t, u_int, u_int32_t, u_int, - int)); +void udp_init (Slirp *); +void udp_input (register struct mbuf *, int); +int udp_output (struct socket *, struct mbuf *, struct sockaddr_in *); +int udp_attach (struct socket *); +void udp_detach (struct socket *); +struct socket * udp_listen (Slirp *, u_int32_t, u_int, u_int32_t, u_int, + int); int udp_output2(struct socket *so, struct mbuf *m, struct sockaddr_in *saddr, struct sockaddr_in *daddr, int iptos); --Boundary-00=_EzdSKPBwlTcPWfl--