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 /hw/usb-net.c | |
parent | 620150dc9c1827cdddfa64a0fada7af5f7ee405b (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 'hw/usb-net.c')
-rw-r--r-- | hw/usb-net.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/hw/usb-net.c b/hw/usb-net.c index f19309ee13..b33e32927c 100644 --- a/hw/usb-net.c +++ b/hw/usb-net.c @@ -26,7 +26,7 @@ #include "qemu-common.h" #include "usb.h" #include "net.h" -#include "sys-queue.h" +#include "qemu-queue.h" /*#define TRAFFIC_DEBUG*/ /* Thanks to NetChip Technologies for donating this product ID. @@ -595,7 +595,7 @@ static const uint32_t oid_supported_list[] = #define NDIS_MAC_OPTION_8021P_PRIORITY (1 << 6) struct rndis_response { - TAILQ_ENTRY(rndis_response) entries; + QTAILQ_ENTRY(rndis_response) entries; uint32_t length; uint8_t buf[0]; }; @@ -621,7 +621,7 @@ typedef struct USBNetState { char usbstring_mac[13]; VLANClientState *vc; - TAILQ_HEAD(rndis_resp_head, rndis_response) rndis_resp; + QTAILQ_HEAD(rndis_resp_head, rndis_response) rndis_resp; } USBNetState; static int ndis_query(USBNetState *s, uint32_t oid, @@ -812,7 +812,7 @@ static int rndis_get_response(USBNetState *s, uint8_t *buf) if (!r) return ret; - TAILQ_REMOVE(&s->rndis_resp, r, entries); + QTAILQ_REMOVE(&s->rndis_resp, r, entries); ret = r->length; memcpy(buf, r->buf, r->length); qemu_free(r); @@ -825,7 +825,7 @@ static void *rndis_queue_response(USBNetState *s, unsigned int length) struct rndis_response *r = qemu_mallocz(sizeof(struct rndis_response) + length); - TAILQ_INSERT_TAIL(&s->rndis_resp, r, entries); + QTAILQ_INSERT_TAIL(&s->rndis_resp, r, entries); r->length = length; return &r->buf[0]; @@ -836,7 +836,7 @@ static void rndis_clear_responsequeue(USBNetState *s) struct rndis_response *r; while ((r = s->rndis_resp.tqh_first)) { - TAILQ_REMOVE(&s->rndis_resp, r, entries); + QTAILQ_REMOVE(&s->rndis_resp, r, entries); qemu_free(r); } } @@ -1440,7 +1440,7 @@ static int usb_net_initfn(USBDevice *dev) s->rndis = 1; s->rndis_state = RNDIS_UNINITIALIZED; - TAILQ_INIT(&s->rndis_resp); + QTAILQ_INIT(&s->rndis_resp); s->medium = 0; /* NDIS_MEDIUM_802_3 */ s->speed = 1000000; /* 100MBps, in 100Bps units */ |