* [Qemu-devel] [PATCH] build fix: Make slirp build on NetBSD
@ 2009-06-30 9:37 Christoph Egger
0 siblings, 0 replies; only message in thread
From: Christoph Egger @ 2009-06-30 9:37 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 2884 bytes --]
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 <Christoph.Egger@amd.com>
--
---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
[-- Attachment #2: qemu_slirp.diff --]
[-- Type: text/x-diff, Size: 10005 bytes --]
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 <netdb.h>
@@ -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);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-06-30 9:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-30 9:37 [Qemu-devel] [PATCH] build fix: Make slirp build on NetBSD Christoph Egger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.