diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2009-09-12 07:36:22 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2009-09-12 07:36:22 +0000 |
commit | 72cf2d4f0e181d0d3a3122e04129c58a95da713e (patch) | |
tree | 4d13c505a692104406090e94dd654fd1e98ec34e /slirp | |
parent | 620150dc9c1827cdddfa64a0fada7af5f7ee405b (diff) | |
download | qemu-72cf2d4f0e181d0d3a3122e04129c58a95da713e.tar.gz qemu-72cf2d4f0e181d0d3a3122e04129c58a95da713e.tar.bz2 qemu-72cf2d4f0e181d0d3a3122e04129c58a95da713e.zip |
Fix sys-queue.h conflict for good
Problem: Our file sys-queue.h is a copy of the BSD file, but there are
some additions and it's not entirely compatible. Because of that, there have
been conflicts with system headers on BSD systems. Some hacks have been
introduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,
f40d753718c72693c5f520f0d9899f6e50395e94,
96555a96d724016e13190b28cffa3bc929ac60dc and
3990d09adf4463eca200ad964cc55643c33feb50 but the fixes were fragile.
Solution: Avoid the conflict entirely by renaming the functions and the
file. Revert the previous hacks.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'slirp')
-rw-r--r-- | slirp/slirp.c | 16 | ||||
-rw-r--r-- | slirp/slirp.h | 4 |
2 files changed, 10 insertions, 10 deletions
diff --git a/slirp/slirp.c b/slirp/slirp.c index d4a9bacf17..6731f529f6 100644 --- a/slirp/slirp.c +++ b/slirp/slirp.c @@ -44,8 +44,8 @@ u_int curtime; static u_int time_fasttimo, last_slowtimo; static int do_slowtimo; -static TAILQ_HEAD(slirp_instances, Slirp) slirp_instances = - TAILQ_HEAD_INITIALIZER(slirp_instances); +static QTAILQ_HEAD(slirp_instances, Slirp) slirp_instances = + QTAILQ_HEAD_INITIALIZER(slirp_instances); static struct in_addr dns_addr; static u_int dns_addr_time; @@ -234,14 +234,14 @@ Slirp *slirp_init(int restricted, struct in_addr vnetwork, register_savevm("slirp", 0, 3, slirp_state_save, slirp_state_load, slirp); - TAILQ_INSERT_TAIL(&slirp_instances, slirp, entry); + QTAILQ_INSERT_TAIL(&slirp_instances, slirp, entry); return slirp; } void slirp_cleanup(Slirp *slirp) { - TAILQ_REMOVE(&slirp_instances, slirp, entry); + QTAILQ_REMOVE(&slirp_instances, slirp, entry); unregister_savevm("slirp", slirp); @@ -261,7 +261,7 @@ void slirp_select_fill(int *pnfds, struct socket *so, *so_next; int nfds; - if (TAILQ_EMPTY(&slirp_instances)) { + if (QTAILQ_EMPTY(&slirp_instances)) { return; } @@ -276,7 +276,7 @@ void slirp_select_fill(int *pnfds, */ do_slowtimo = 0; - TAILQ_FOREACH(slirp, &slirp_instances, entry) { + QTAILQ_FOREACH(slirp, &slirp_instances, entry) { /* * *_slowtimo needs calling if there are IP fragments * in the fragment queue, or there are TCP connections active @@ -384,7 +384,7 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds, struct socket *so, *so_next; int ret; - if (TAILQ_EMPTY(&slirp_instances)) { + if (QTAILQ_EMPTY(&slirp_instances)) { return; } @@ -394,7 +394,7 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds, curtime = qemu_get_clock(rt_clock); - TAILQ_FOREACH(slirp, &slirp_instances, entry) { + QTAILQ_FOREACH(slirp, &slirp_instances, entry) { /* * See if anything has timed out */ diff --git a/slirp/slirp.h b/slirp/slirp.h index 020412caf3..9ef57ea394 100644 --- a/slirp/slirp.h +++ b/slirp/slirp.h @@ -174,7 +174,7 @@ int inet_aton(const char *cp, struct in_addr *ia); #include "debug.h" -#include "sys-queue.h" +#include "qemu-queue.h" #include "libslirp.h" #include "ip.h" @@ -198,7 +198,7 @@ int inet_aton(const char *cp, struct in_addr *ia); #include "tftp.h" struct Slirp { - TAILQ_ENTRY(Slirp) entry; + QTAILQ_ENTRY(Slirp) entry; /* virtual network configuration */ struct in_addr vnetwork_addr; |