aboutsummaryrefslogtreecommitdiff
path: root/slirp/slirp.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2009-09-12 07:36:22 +0000
committerBlue Swirl <blauwirbel@gmail.com>2009-09-12 07:36:22 +0000
commit72cf2d4f0e181d0d3a3122e04129c58a95da713e (patch)
tree4d13c505a692104406090e94dd654fd1e98ec34e /slirp/slirp.c
parent620150dc9c1827cdddfa64a0fada7af5f7ee405b (diff)
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/slirp.c')
-rw-r--r--slirp/slirp.c16
1 files changed, 8 insertions, 8 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
*/