diff --git a/acl.c b/acl.c
index 1a11a61..311dade 100644
--- a/acl.c
+++ b/acl.c
@@ -64,7 +64,7 @@
     acl->defaultDeny = 1;
 
     acl->nentries = 0;
-    TAILQ_INIT(&acl->entries);
+    QTAILQ_INIT(&acl->entries);
 
     acls = qemu_realloc(acls, sizeof(*acls) * (nacls +1));
     acls[nacls] = acl;
@@ -78,7 +78,7 @@
 {
     qemu_acl_entry *entry;
 
-    TAILQ_FOREACH(entry, &acl->entries, next) {
+    QTAILQ_FOREACH(entry, &acl->entries, next) {
 #ifdef CONFIG_FNMATCH
         if (fnmatch(entry->match, party, 0) == 0)
             return entry->deny ? 0 : 1;
@@ -102,8 +102,8 @@
      * of "open access" while the user re-initializes the
      * access control list */
     acl->defaultDeny = 1;
-    TAILQ_FOREACH(entry, &acl->entries, next) {
-        TAILQ_REMOVE(&acl->entries, entry, next);
+    QTAILQ_FOREACH(entry, &acl->entries, next) {
+        QTAILQ_REMOVE(&acl->entries, entry, next);
         free(entry->match);
         free(entry);
     }
@@ -121,7 +121,7 @@
     entry->match = qemu_strdup(match);
     entry->deny = deny;
 
-    TAILQ_INSERT_TAIL(&acl->entries, entry, next);
+    QTAILQ_INSERT_TAIL(&acl->entries, entry, next);
     acl->nentries++;
 
     return acl->nentries;
@@ -147,10 +147,10 @@
     entry->match = qemu_strdup(match);
     entry->deny = deny;
 
-    TAILQ_FOREACH(tmp, &acl->entries, next) {
+    QTAILQ_FOREACH(tmp, &acl->entries, next) {
         i++;
         if (i == index) {
-            TAILQ_INSERT_BEFORE(tmp, entry, next);
+            QTAILQ_INSERT_BEFORE(tmp, entry, next);
             acl->nentries++;
             break;
         }
@@ -165,10 +165,10 @@
     qemu_acl_entry *entry;
     int i = 0;
 
-    TAILQ_FOREACH(entry, &acl->entries, next) {
+    QTAILQ_FOREACH(entry, &acl->entries, next) {
         i++;
         if (strcmp(entry->match, match) == 0) {
-            TAILQ_REMOVE(&acl->entries, entry, next);
+            QTAILQ_REMOVE(&acl->entries, entry, next);
             return i;
         }
     }
diff --git a/acl.h b/acl.h
index 62a5e56..0ef7804 100644
--- a/acl.h
+++ b/acl.h
@@ -25,7 +25,7 @@
 #ifndef __QEMU_ACL_H__
 #define __QEMU_ACL_H__
 
-#include "sys-queue.h"
+#include "qemu-queue.h"
 
 typedef struct qemu_acl_entry qemu_acl_entry;
 typedef struct qemu_acl qemu_acl;
@@ -34,13 +34,13 @@
     char *match;
     int deny;
 
-    TAILQ_ENTRY(qemu_acl_entry) next;
+    QTAILQ_ENTRY(qemu_acl_entry) next;
 };
 
 struct qemu_acl {
     char *aclname;
     unsigned int nentries;
-    TAILQ_HEAD(,qemu_acl_entry) entries;
+    QTAILQ_HEAD(,qemu_acl_entry) entries;
     int defaultDeny;
 };
 
diff --git a/aio.c b/aio.c
index efc63fd..da18443 100644
--- a/aio.c
+++ b/aio.c
@@ -13,13 +13,13 @@
 
 #include "qemu-common.h"
 #include "block.h"
-#include "sys-queue.h"
+#include "qemu-queue.h"
 #include "qemu_socket.h"
 
 typedef struct AioHandler AioHandler;
 
 /* The list of registered AIO handlers */
-static LIST_HEAD(, AioHandler) aio_handlers;
+static QLIST_HEAD(, AioHandler) aio_handlers;
 
 /* This is a simple lock used to protect the aio_handlers list.  Specifically,
  * it's used to ensure that no callbacks are removed while we're walking and
@@ -35,14 +35,14 @@
     AioFlushHandler *io_flush;
     int deleted;
     void *opaque;
-    LIST_ENTRY(AioHandler) node;
+    QLIST_ENTRY(AioHandler) node;
 };
 
 static AioHandler *find_aio_handler(int fd)
 {
     AioHandler *node;
 
-    LIST_FOREACH(node, &aio_handlers, node) {
+    QLIST_FOREACH(node, &aio_handlers, node) {
         if (node->fd == fd)
             if (!node->deleted)
                 return node;
@@ -72,7 +72,7 @@
                  * deleted because deleted nodes are only cleaned up after
                  * releasing the walking_handlers lock.
                  */
-                LIST_REMOVE(node, node);
+                QLIST_REMOVE(node, node);
                 qemu_free(node);
             }
         }
@@ -81,7 +81,7 @@
             /* Alloc and insert if it's not already there */
             node = qemu_mallocz(sizeof(AioHandler));
             node->fd = fd;
-            LIST_INSERT_HEAD(&aio_handlers, node, node);
+            QLIST_INSERT_HEAD(&aio_handlers, node, node);
         }
         /* Update handler with latest information */
         node->io_read = io_read;
@@ -109,7 +109,7 @@
 	 */
         qemu_aio_wait();
 
-        LIST_FOREACH(node, &aio_handlers, node) {
+        QLIST_FOREACH(node, &aio_handlers, node) {
             ret |= node->io_flush(node->opaque);
         }
     } while (qemu_bh_poll() || ret > 0);
@@ -133,7 +133,7 @@
         FD_ZERO(&wrfds);
 
         /* fill fd sets */
-        LIST_FOREACH(node, &aio_handlers, node) {
+        QLIST_FOREACH(node, &aio_handlers, node) {
             /* If there aren't pending AIO operations, don't invoke callbacks.
              * Otherwise, if there are no AIO requests, qemu_aio_wait() would
              * wait indefinitely.
@@ -168,7 +168,7 @@
 
             /* we have to walk very carefully in case
              * qemu_aio_set_fd_handler is called while we're walking */
-            node = LIST_FIRST(&aio_handlers);
+            node = QLIST_FIRST(&aio_handlers);
             while (node) {
                 AioHandler *tmp;
 
@@ -184,10 +184,10 @@
                 }
 
                 tmp = node;
-                node = LIST_NEXT(node, node);
+                node = QLIST_NEXT(node, node);
 
                 if (tmp->deleted) {
-                    LIST_REMOVE(tmp, node);
+                    QLIST_REMOVE(tmp, node);
                     qemu_free(tmp);
                 }
             }
diff --git a/audio/audio.c b/audio/audio.c
index aa9ea3e..e223cf3 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -766,8 +766,8 @@
             sw->rate = NULL;
         }
 
-        LIST_REMOVE (sw, entries);
-        LIST_REMOVE (sc, entries);
+        QLIST_REMOVE (sw, entries);
+        QLIST_REMOVE (sc, entries);
         qemu_free (sc);
         if (was_active) {
             /* We have removed soft voice from the capture:
@@ -811,8 +811,8 @@
             qemu_free (sw);
             return -1;
         }
-        LIST_INSERT_HEAD (&hw_cap->sw_head, sw, entries);
-        LIST_INSERT_HEAD (&hw->cap_head, sc, entries);
+        QLIST_INSERT_HEAD (&hw_cap->sw_head, sw, entries);
+        QLIST_INSERT_HEAD (&hw->cap_head, sc, entries);
 #ifdef DEBUG_CAPTURE
         asprintf (&sw->name, "for %p %d,%d,%d",
                   hw, sw->info.freq, sw->info.bits, sw->info.nchannels);
@@ -1803,9 +1803,9 @@
         return;
     }
 
-    LIST_INIT (&s->hw_head_out);
-    LIST_INIT (&s->hw_head_in);
-    LIST_INIT (&s->cap_head);
+    QLIST_INIT (&s->hw_head_out);
+    QLIST_INIT (&s->hw_head_in);
+    QLIST_INIT (&s->cap_head);
     atexit (audio_atexit);
 
     s->ts = qemu_new_timer (vm_clock, audio_timer, s);
@@ -1887,7 +1887,7 @@
                "(Audio can continue looping even after stopping the VM)\n");
     }
 
-    LIST_INIT (&s->card_head);
+    QLIST_INIT (&s->card_head);
     register_savevm ("audio", 0, 1, audio_save, audio_load, s);
 }
 
@@ -1896,12 +1896,12 @@
     audio_init ();
     card->name = qemu_strdup (name);
     memset (&card->entries, 0, sizeof (card->entries));
-    LIST_INSERT_HEAD (&glob_audio_state.card_head, card, entries);
+    QLIST_INSERT_HEAD (&glob_audio_state.card_head, card, entries);
 }
 
 void AUD_remove_card (QEMUSoundCard *card)
 {
-    LIST_REMOVE (card, entries);
+    QLIST_REMOVE (card, entries);
     qemu_free (card->name);
 }
 
@@ -1933,7 +1933,7 @@
 
     cap = audio_pcm_capture_find_specific (as);
     if (cap) {
-        LIST_INSERT_HEAD (&cap->cb_head, cb, entries);
+        QLIST_INSERT_HEAD (&cap->cb_head, cb, entries);
         return cap;
     }
     else {
@@ -1948,8 +1948,8 @@
         }
 
         hw = &cap->hw;
-        LIST_INIT (&hw->sw_head);
-        LIST_INIT (&cap->cb_head);
+        QLIST_INIT (&hw->sw_head);
+        QLIST_INIT (&cap->cb_head);
 
         /* XXX find a more elegant way */
         hw->samples = 4096 * 4;
@@ -1977,8 +1977,8 @@
             [hw->info.swap_endianness]
             [audio_bits_to_index (hw->info.bits)];
 
-        LIST_INSERT_HEAD (&s->cap_head, cap, entries);
-        LIST_INSERT_HEAD (&cap->cb_head, cb, entries);
+        QLIST_INSERT_HEAD (&s->cap_head, cap, entries);
+        QLIST_INSERT_HEAD (&cap->cb_head, cb, entries);
 
         hw = NULL;
         while ((hw = audio_pcm_hw_find_any_out (hw))) {
@@ -2004,7 +2004,7 @@
     for (cb = cap->cb_head.lh_first; cb; cb = cb->entries.le_next) {
         if (cb->opaque == cb_opaque) {
             cb->ops.destroy (cb_opaque);
-            LIST_REMOVE (cb, entries);
+            QLIST_REMOVE (cb, entries);
             qemu_free (cb);
 
             if (!cap->cb_head.lh_first) {
@@ -2021,12 +2021,12 @@
                         st_rate_stop (sw->rate);
                         sw->rate = NULL;
                     }
-                    LIST_REMOVE (sw, entries);
-                    LIST_REMOVE (sc, entries);
+                    QLIST_REMOVE (sw, entries);
+                    QLIST_REMOVE (sc, entries);
                     qemu_free (sc);
                     sw = sw1;
                 }
-                LIST_REMOVE (cap, entries);
+                QLIST_REMOVE (cap, entries);
                 qemu_free (cap);
             }
             return;
diff --git a/audio/audio.h b/audio/audio.h
index dec86e5..f234ad0f 100644
--- a/audio/audio.h
+++ b/audio/audio.h
@@ -25,7 +25,7 @@
 #define QEMU_AUDIO_H
 
 #include "config-host.h"
-#include "sys-queue.h"
+#include "qemu-queue.h"
 
 typedef void (*audio_callback_fn_t) (void *opaque, int avail);
 
@@ -70,7 +70,7 @@
 typedef struct CaptureState {
     void *opaque;
     struct capture_ops ops;
-    LIST_ENTRY (CaptureState) entries;
+    QLIST_ENTRY (CaptureState) entries;
 } CaptureState;
 
 typedef struct SWVoiceOut SWVoiceOut;
@@ -79,7 +79,7 @@
 
 typedef struct QEMUSoundCard {
     char *name;
-    LIST_ENTRY (QEMUSoundCard) entries;
+    QLIST_ENTRY (QEMUSoundCard) entries;
 } QEMUSoundCard;
 
 typedef struct QEMUAudioTimeStamp {
diff --git a/audio/audio_int.h b/audio/audio_int.h
index d930d07..ce791ee 100644
--- a/audio/audio_int.h
+++ b/audio/audio_int.h
@@ -80,10 +80,10 @@
     struct st_sample *mix_buf;
 
     int samples;
-    LIST_HEAD (sw_out_listhead, SWVoiceOut) sw_head;
-    LIST_HEAD (sw_cap_listhead, SWVoiceCap) cap_head;
+    QLIST_HEAD (sw_out_listhead, SWVoiceOut) sw_head;
+    QLIST_HEAD (sw_cap_listhead, SWVoiceCap) cap_head;
     struct audio_pcm_ops *pcm_ops;
-    LIST_ENTRY (HWVoiceOut) entries;
+    QLIST_ENTRY (HWVoiceOut) entries;
 } HWVoiceOut;
 
 typedef struct HWVoiceIn {
@@ -100,9 +100,9 @@
     struct st_sample *conv_buf;
 
     int samples;
-    LIST_HEAD (sw_in_listhead, SWVoiceIn) sw_head;
+    QLIST_HEAD (sw_in_listhead, SWVoiceIn) sw_head;
     struct audio_pcm_ops *pcm_ops;
-    LIST_ENTRY (HWVoiceIn) entries;
+    QLIST_ENTRY (HWVoiceIn) entries;
 } HWVoiceIn;
 
 struct SWVoiceOut {
@@ -119,7 +119,7 @@
     char *name;
     struct mixeng_volume vol;
     struct audio_callback callback;
-    LIST_ENTRY (SWVoiceOut) entries;
+    QLIST_ENTRY (SWVoiceOut) entries;
 };
 
 struct SWVoiceIn {
@@ -135,7 +135,7 @@
     char *name;
     struct mixeng_volume vol;
     struct audio_callback callback;
-    LIST_ENTRY (SWVoiceIn) entries;
+    QLIST_ENTRY (SWVoiceIn) entries;
 };
 
 struct audio_driver {
@@ -169,20 +169,20 @@
 struct capture_callback {
     struct audio_capture_ops ops;
     void *opaque;
-    LIST_ENTRY (capture_callback) entries;
+    QLIST_ENTRY (capture_callback) entries;
 };
 
 struct CaptureVoiceOut {
     HWVoiceOut hw;
     void *buf;
-    LIST_HEAD (cb_listhead, capture_callback) cb_head;
-    LIST_ENTRY (CaptureVoiceOut) entries;
+    QLIST_HEAD (cb_listhead, capture_callback) cb_head;
+    QLIST_ENTRY (CaptureVoiceOut) entries;
 };
 
 struct SWVoiceCap {
     SWVoiceOut sw;
     CaptureVoiceOut *cap;
-    LIST_ENTRY (SWVoiceCap) entries;
+    QLIST_ENTRY (SWVoiceCap) entries;
 };
 
 struct AudioState {
@@ -190,10 +190,10 @@
     void *drv_opaque;
 
     QEMUTimer *ts;
-    LIST_HEAD (card_listhead, QEMUSoundCard) card_head;
-    LIST_HEAD (hw_in_listhead, HWVoiceIn) hw_head_in;
-    LIST_HEAD (hw_out_listhead, HWVoiceOut) hw_head_out;
-    LIST_HEAD (cap_listhead, CaptureVoiceOut) cap_head;
+    QLIST_HEAD (card_listhead, QEMUSoundCard) card_head;
+    QLIST_HEAD (hw_in_listhead, HWVoiceIn) hw_head_in;
+    QLIST_HEAD (hw_out_listhead, HWVoiceOut) hw_head_out;
+    QLIST_HEAD (cap_listhead, CaptureVoiceOut) cap_head;
     int nb_hw_voices_out;
     int nb_hw_voices_in;
     int vm_running;
diff --git a/audio/audio_template.h b/audio/audio_template.h
index 0ffca65..e65d834 100644
--- a/audio/audio_template.h
+++ b/audio/audio_template.h
@@ -184,12 +184,12 @@
 
 static void glue (audio_pcm_hw_add_sw_, TYPE) (HW *hw, SW *sw)
 {
-    LIST_INSERT_HEAD (&hw->sw_head, sw, entries);
+    QLIST_INSERT_HEAD (&hw->sw_head, sw, entries);
 }
 
 static void glue (audio_pcm_hw_del_sw_, TYPE) (SW *sw)
 {
-    LIST_REMOVE (sw, entries);
+    QLIST_REMOVE (sw, entries);
 }
 
 static void glue (audio_pcm_hw_gc_, TYPE) (HW **hwp)
@@ -201,7 +201,7 @@
 #ifdef DAC
         audio_detach_capture (hw);
 #endif
-        LIST_REMOVE (hw, entries);
+        QLIST_REMOVE (hw, entries);
         glue (s->nb_hw_voices_, TYPE) += 1;
         glue (audio_pcm_hw_free_resources_ ,TYPE) (hw);
         glue (hw->pcm_ops->fini_, TYPE) (hw);
@@ -267,9 +267,9 @@
     }
 
     hw->pcm_ops = drv->pcm_ops;
-    LIST_INIT (&hw->sw_head);
+    QLIST_INIT (&hw->sw_head);
 #ifdef DAC
-    LIST_INIT (&hw->cap_head);
+    QLIST_INIT (&hw->cap_head);
 #endif
     if (glue (hw->pcm_ops->init_, TYPE) (hw, as)) {
         goto err0;
@@ -294,7 +294,7 @@
         goto err1;
     }
 
-    LIST_INSERT_HEAD (&s->glue (hw_head_, TYPE), hw, entries);
+    QLIST_INSERT_HEAD (&s->glue (hw_head_, TYPE), hw, entries);
     glue (s->nb_hw_voices_, TYPE) -= 1;
 #ifdef DAC
     audio_attach_capture (hw);
diff --git a/block.c b/block.c
index 0c6a97b..33f3d65 100644
--- a/block.c
+++ b/block.c
@@ -22,11 +22,6 @@
  * THE SOFTWARE.
  */
 #include "config-host.h"
-#ifdef CONFIG_BSD
-/* include native header before sys-queue.h */
-#include <sys/queue.h>
-#endif
-
 #include "qemu-common.h"
 #include "monitor.h"
 #include "block_int.h"
@@ -36,6 +31,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
+#include <sys/queue.h>
 #ifndef __DragonFly__
 #include <sys/disk.h>
 #endif
diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c
index d4631c3..54e505c 100644
--- a/block/qcow2-cluster.c
+++ b/block/qcow2-cluster.c
@@ -738,7 +738,7 @@
      * the same cluster. In this case we need to wait until the previous
      * request has completed and updated the L2 table accordingly.
      */
-    LIST_FOREACH(old_alloc, &s->cluster_allocs, next_in_flight) {
+    QLIST_FOREACH(old_alloc, &s->cluster_allocs, next_in_flight) {
 
         uint64_t end_offset = offset + nb_clusters * s->cluster_size;
         uint64_t old_offset = old_alloc->offset;
@@ -769,7 +769,7 @@
         abort();
     }
 
-    LIST_INSERT_HEAD(&s->cluster_allocs, m, next_in_flight);
+    QLIST_INSERT_HEAD(&s->cluster_allocs, m, next_in_flight);
 
     /* allocate a new cluster */
 
diff --git a/block/qcow2.c b/block/qcow2.c
index 8579e01..a9e7682 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -219,7 +219,7 @@
     if (qcow2_refcount_init(bs) < 0)
         goto fail;
 
-    LIST_INIT(&s->cluster_allocs);
+    QLIST_INIT(&s->cluster_allocs);
 
     /* read qcow2 extensions */
     if (header.backing_file_offset)
@@ -340,7 +340,7 @@
     QEMUIOVector hd_qiov;
     QEMUBH *bh;
     QCowL2Meta l2meta;
-    LIST_ENTRY(QCowAIOCB) next_depend;
+    QLIST_ENTRY(QCowAIOCB) next_depend;
 } QCowAIOCB;
 
 static void qcow_aio_cancel(BlockDriverAIOCB *blockacb)
@@ -503,7 +503,7 @@
     acb->n = 0;
     acb->cluster_offset = 0;
     acb->l2meta.nb_clusters = 0;
-    LIST_INIT(&acb->l2meta.dependent_requests);
+    QLIST_INIT(&acb->l2meta.dependent_requests);
     return acb;
 }
 
@@ -530,12 +530,12 @@
 
     /* Take the request off the list of running requests */
     if (m->nb_clusters != 0) {
-        LIST_REMOVE(m, next_in_flight);
+        QLIST_REMOVE(m, next_in_flight);
     }
 
     /*
      * Restart all dependent requests.
-     * Can't use LIST_FOREACH here - the next link might not be the same
+     * Can't use QLIST_FOREACH here - the next link might not be the same
      * any more after the callback  (request could depend on a different
      * request now)
      */
@@ -545,7 +545,7 @@
     }
 
     /* Empty the list for the next part of the request */
-    LIST_INIT(&m->dependent_requests);
+    QLIST_INIT(&m->dependent_requests);
 }
 
 static void qcow_aio_write_cb(void *opaque, int ret)
@@ -590,7 +590,7 @@
 
     /* Need to wait for another request? If so, we are done for now. */
     if (!acb->cluster_offset && acb->l2meta.depends_on != NULL) {
-        LIST_INSERT_HEAD(&acb->l2meta.depends_on->dependent_requests,
+        QLIST_INSERT_HEAD(&acb->l2meta.depends_on->dependent_requests,
             acb, next_depend);
         return;
     }
@@ -690,7 +690,7 @@
 
     nb_sectors = bdrv_getlength(bs) >> 9;
     offset = 0;
-    LIST_INIT(&meta.dependent_requests);
+    QLIST_INIT(&meta.dependent_requests);
 
     while (nb_sectors) {
         num = MIN(nb_sectors, INT_MAX >> 9);
diff --git a/block/qcow2.h b/block/qcow2.h
index 965a2f4..ecc94cb 100644
--- a/block/qcow2.h
+++ b/block/qcow2.h
@@ -98,7 +98,7 @@
     uint8_t *cluster_cache;
     uint8_t *cluster_data;
     uint64_t cluster_cache_offset;
-    LIST_HEAD(QCowClusterAlloc, QCowL2Meta) cluster_allocs;
+    QLIST_HEAD(QCowClusterAlloc, QCowL2Meta) cluster_allocs;
 
     uint64_t *refcount_table;
     uint64_t refcount_table_offset;
@@ -139,9 +139,9 @@
     int nb_available;
     int nb_clusters;
     struct QCowL2Meta *depends_on;
-    LIST_HEAD(QCowAioDependencies, QCowAIOCB) dependent_requests;
+    QLIST_HEAD(QCowAioDependencies, QCowAIOCB) dependent_requests;
 
-    LIST_ENTRY(QCowL2Meta) next_in_flight;
+    QLIST_ENTRY(QCowL2Meta) next_in_flight;
 } QCowL2Meta;
 
 static inline int size_to_clusters(BDRVQcowState *s, int64_t size)
diff --git a/check-qdict.c b/check-qdict.c
index 19989d6..c37d448 100644
--- a/check-qdict.c
+++ b/check-qdict.c
@@ -47,7 +47,7 @@
     qdict_put_obj(qdict, "", QOBJECT(qint_from_int(num)));
 
     fail_unless(qdict_size(qdict) == 1);
-    ent = LIST_FIRST(&qdict->table[12345 % QDICT_HASH_SIZE]);
+    ent = QLIST_FIRST(&qdict->table[12345 % QDICT_HASH_SIZE]);
     qi = qobject_to_qint(ent->value);
     fail_unless(qint_get_int(qi) == num);
 
diff --git a/cpu-defs.h b/cpu-defs.h
index b6c8b95..95068b5 100644
--- a/cpu-defs.h
+++ b/cpu-defs.h
@@ -28,7 +28,7 @@
 #include <inttypes.h>
 #include <signal.h>
 #include "osdep.h"
-#include "sys-queue.h"
+#include "qemu-queue.h"
 #include "targphys.h"
 
 #ifndef TARGET_LONG_BITS
@@ -124,14 +124,14 @@
 typedef struct CPUBreakpoint {
     target_ulong pc;
     int flags; /* BP_* */
-    TAILQ_ENTRY(CPUBreakpoint) entry;
+    QTAILQ_ENTRY(CPUBreakpoint) entry;
 } CPUBreakpoint;
 
 typedef struct CPUWatchpoint {
     target_ulong vaddr;
     target_ulong len_mask;
     int flags; /* BP_* */
-    TAILQ_ENTRY(CPUWatchpoint) entry;
+    QTAILQ_ENTRY(CPUWatchpoint) entry;
 } CPUWatchpoint;
 
 #define CPU_TEMP_BUF_NLONGS 128
@@ -169,10 +169,10 @@
                                                                         \
     /* from this point: preserved by CPU reset */                       \
     /* ice debug support */                                             \
-    TAILQ_HEAD(breakpoints_head, CPUBreakpoint) breakpoints;            \
+    QTAILQ_HEAD(breakpoints_head, CPUBreakpoint) breakpoints;            \
     int singlestep_enabled;                                             \
                                                                         \
-    TAILQ_HEAD(watchpoints_head, CPUWatchpoint) watchpoints;            \
+    QTAILQ_HEAD(watchpoints_head, CPUWatchpoint) watchpoints;            \
     CPUWatchpoint *watchpoint_hit;                                      \
                                                                         \
     struct GDBRegisterState *gdb_regs;                                  \
diff --git a/cpu-exec.c b/cpu-exec.c
index bf20ada..8aa92c7 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -202,7 +202,7 @@
     CPUWatchpoint *wp;
 
     if (!env->watchpoint_hit)
-        TAILQ_FOREACH(wp, &env->watchpoints, entry)
+        QTAILQ_FOREACH(wp, &env->watchpoints, entry)
             wp->flags &= ~BP_WATCHPOINT_HIT;
 
     if (debug_excp_handler)
diff --git a/envlist.c b/envlist.c
index e13c2d3..f2303cd 100644
--- a/envlist.c
+++ b/envlist.c
@@ -1,20 +1,19 @@
-#include <sys/queue.h>
-
 #include <assert.h>
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
 
+#include "qemu-queue.h"
 #include "envlist.h"
 
 struct envlist_entry {
 	const char *ev_var;			/* actual env value */
-	LIST_ENTRY(envlist_entry) ev_link;
+	QLIST_ENTRY(envlist_entry) ev_link;
 };
 
 struct envlist {
-	LIST_HEAD(, envlist_entry) el_entries;	/* actual entries */
+	QLIST_HEAD(, envlist_entry) el_entries;	/* actual entries */
 	size_t el_count;			/* number of entries */
 };
 
@@ -33,7 +32,7 @@
 	if ((envlist = malloc(sizeof (*envlist))) == NULL)
 		return (NULL);
 
-	LIST_INIT(&envlist->el_entries);
+	QLIST_INIT(&envlist->el_entries);
 	envlist->el_count = 0;
 
 	return (envlist);
@@ -51,7 +50,7 @@
 
 	while (envlist->el_entries.lh_first != NULL) {
 		entry = envlist->el_entries.lh_first;
-		LIST_REMOVE(entry, ev_link);
+		QLIST_REMOVE(entry, ev_link);
 
 		free((char *)entry->ev_var);
 		free(entry);
@@ -159,7 +158,7 @@
 	}
 
 	if (entry != NULL) {
-		LIST_REMOVE(entry, ev_link);
+		QLIST_REMOVE(entry, ev_link);
 		free((char *)entry->ev_var);
 		free(entry);
 	} else {
@@ -172,7 +171,7 @@
 		free(entry);
 		return (errno);
 	}
-	LIST_INSERT_HEAD(&envlist->el_entries, entry, ev_link);
+	QLIST_INSERT_HEAD(&envlist->el_entries, entry, ev_link);
 
 	return (0);
 }
@@ -205,7 +204,7 @@
 			break;
 	}
 	if (entry != NULL) {
-		LIST_REMOVE(entry, ev_link);
+		QLIST_REMOVE(entry, ev_link);
 		free((char *)entry->ev_var);
 		free(entry);
 
diff --git a/exec.c b/exec.c
index 6a62a8a..c82e767 100644
--- a/exec.c
+++ b/exec.c
@@ -586,8 +586,8 @@
     }
     env->cpu_index = cpu_index;
     env->numa_node = 0;
-    TAILQ_INIT(&env->breakpoints);
-    TAILQ_INIT(&env->watchpoints);
+    QTAILQ_INIT(&env->breakpoints);
+    QTAILQ_INIT(&env->watchpoints);
     *penv = env;
 #if defined(CONFIG_USER_ONLY)
     cpu_list_unlock();
@@ -1348,9 +1348,9 @@
 
     /* keep all GDB-injected watchpoints in front */
     if (flags & BP_GDB)
-        TAILQ_INSERT_HEAD(&env->watchpoints, wp, entry);
+        QTAILQ_INSERT_HEAD(&env->watchpoints, wp, entry);
     else
-        TAILQ_INSERT_TAIL(&env->watchpoints, wp, entry);
+        QTAILQ_INSERT_TAIL(&env->watchpoints, wp, entry);
 
     tlb_flush_page(env, addr);
 
@@ -1366,7 +1366,7 @@
     target_ulong len_mask = ~(len - 1);
     CPUWatchpoint *wp;
 
-    TAILQ_FOREACH(wp, &env->watchpoints, entry) {
+    QTAILQ_FOREACH(wp, &env->watchpoints, entry) {
         if (addr == wp->vaddr && len_mask == wp->len_mask
                 && flags == (wp->flags & ~BP_WATCHPOINT_HIT)) {
             cpu_watchpoint_remove_by_ref(env, wp);
@@ -1379,7 +1379,7 @@
 /* Remove a specific watchpoint by reference.  */
 void cpu_watchpoint_remove_by_ref(CPUState *env, CPUWatchpoint *watchpoint)
 {
-    TAILQ_REMOVE(&env->watchpoints, watchpoint, entry);
+    QTAILQ_REMOVE(&env->watchpoints, watchpoint, entry);
 
     tlb_flush_page(env, watchpoint->vaddr);
 
@@ -1391,7 +1391,7 @@
 {
     CPUWatchpoint *wp, *next;
 
-    TAILQ_FOREACH_SAFE(wp, &env->watchpoints, entry, next) {
+    QTAILQ_FOREACH_SAFE(wp, &env->watchpoints, entry, next) {
         if (wp->flags & mask)
             cpu_watchpoint_remove_by_ref(env, wp);
     }
@@ -1411,9 +1411,9 @@
 
     /* keep all GDB-injected breakpoints in front */
     if (flags & BP_GDB)
-        TAILQ_INSERT_HEAD(&env->breakpoints, bp, entry);
+        QTAILQ_INSERT_HEAD(&env->breakpoints, bp, entry);
     else
-        TAILQ_INSERT_TAIL(&env->breakpoints, bp, entry);
+        QTAILQ_INSERT_TAIL(&env->breakpoints, bp, entry);
 
     breakpoint_invalidate(env, pc);
 
@@ -1431,7 +1431,7 @@
 #if defined(TARGET_HAS_ICE)
     CPUBreakpoint *bp;
 
-    TAILQ_FOREACH(bp, &env->breakpoints, entry) {
+    QTAILQ_FOREACH(bp, &env->breakpoints, entry) {
         if (bp->pc == pc && bp->flags == flags) {
             cpu_breakpoint_remove_by_ref(env, bp);
             return 0;
@@ -1447,7 +1447,7 @@
 void cpu_breakpoint_remove_by_ref(CPUState *env, CPUBreakpoint *breakpoint)
 {
 #if defined(TARGET_HAS_ICE)
-    TAILQ_REMOVE(&env->breakpoints, breakpoint, entry);
+    QTAILQ_REMOVE(&env->breakpoints, breakpoint, entry);
 
     breakpoint_invalidate(env, breakpoint->pc);
 
@@ -1461,7 +1461,7 @@
 #if defined(TARGET_HAS_ICE)
     CPUBreakpoint *bp, *next;
 
-    TAILQ_FOREACH_SAFE(bp, &env->breakpoints, entry, next) {
+    QTAILQ_FOREACH_SAFE(bp, &env->breakpoints, entry, next) {
         if (bp->flags & mask)
             cpu_breakpoint_remove_by_ref(env, bp);
     }
@@ -1712,13 +1712,13 @@
     /* Clone all break/watchpoints.
        Note: Once we support ptrace with hw-debug register access, make sure
        BP_CPU break/watchpoints are handled correctly on clone. */
-    TAILQ_INIT(&env->breakpoints);
-    TAILQ_INIT(&env->watchpoints);
+    QTAILQ_INIT(&env->breakpoints);
+    QTAILQ_INIT(&env->watchpoints);
 #if defined(TARGET_HAS_ICE)
-    TAILQ_FOREACH(bp, &env->breakpoints, entry) {
+    QTAILQ_FOREACH(bp, &env->breakpoints, entry) {
         cpu_breakpoint_insert(new_env, bp->pc, bp->flags, NULL);
     }
-    TAILQ_FOREACH(wp, &env->watchpoints, entry) {
+    QTAILQ_FOREACH(wp, &env->watchpoints, entry) {
         cpu_watchpoint_insert(new_env, wp->vaddr, (~wp->len_mask) + 1,
                               wp->flags, NULL);
     }
@@ -2009,7 +2009,7 @@
     code_address = address;
     /* Make accesses to pages with watchpoints go via the
        watchpoint trap routines.  */
-    TAILQ_FOREACH(wp, &env->watchpoints, entry) {
+    QTAILQ_FOREACH(wp, &env->watchpoints, entry) {
         if (vaddr == (wp->vaddr & TARGET_PAGE_MASK)) {
             iotlb = io_mem_watch + paddr;
             /* TODO: The memory case can be optimized by not trapping
@@ -2663,7 +2663,7 @@
         return;
     }
     vaddr = (env->mem_io_vaddr & TARGET_PAGE_MASK) + offset;
-    TAILQ_FOREACH(wp, &env->watchpoints, entry) {
+    QTAILQ_FOREACH(wp, &env->watchpoints, entry) {
         if ((vaddr == (wp->vaddr & len_mask) ||
              (vaddr & wp->len_mask) == wp->vaddr) && (wp->flags & flags)) {
             wp->flags |= BP_WATCHPOINT_HIT;
@@ -3169,11 +3169,11 @@
 typedef struct MapClient {
     void *opaque;
     void (*callback)(void *opaque);
-    LIST_ENTRY(MapClient) link;
+    QLIST_ENTRY(MapClient) link;
 } MapClient;
 
-static LIST_HEAD(map_client_list, MapClient) map_client_list
-    = LIST_HEAD_INITIALIZER(map_client_list);
+static QLIST_HEAD(map_client_list, MapClient) map_client_list
+    = QLIST_HEAD_INITIALIZER(map_client_list);
 
 void *cpu_register_map_client(void *opaque, void (*callback)(void *opaque))
 {
@@ -3181,7 +3181,7 @@
 
     client->opaque = opaque;
     client->callback = callback;
-    LIST_INSERT_HEAD(&map_client_list, client, link);
+    QLIST_INSERT_HEAD(&map_client_list, client, link);
     return client;
 }
 
@@ -3189,7 +3189,7 @@
 {
     MapClient *client = (MapClient *)_client;
 
-    LIST_REMOVE(client, link);
+    QLIST_REMOVE(client, link);
     qemu_free(client);
 }
 
@@ -3197,8 +3197,8 @@
 {
     MapClient *client;
 
-    while (!LIST_EMPTY(&map_client_list)) {
-        client = LIST_FIRST(&map_client_list);
+    while (!QLIST_EMPTY(&map_client_list)) {
+        client = QLIST_FIRST(&map_client_list);
         client->callback(client->opaque);
         cpu_unregister_map_client(client);
     }
diff --git a/hw/device-hotplug.c b/hw/device-hotplug.c
index fd4cc3f..69779ca 100644
--- a/hw/device-hotplug.c
+++ b/hw/device-hotplug.c
@@ -68,7 +68,7 @@
     DriveInfo *dinfo;
     struct BlockDriverState *bs;
 
-    TAILQ_FOREACH(dinfo, &drives, next) {
+    QTAILQ_FOREACH(dinfo, &drives, next) {
         bs = dinfo->bdrv;
         if (bs) {
             if (bs->private && match_fn(bs->private, arg)) {
diff --git a/hw/i2c.c b/hw/i2c.c
index 5473772..370c431 100644
--- a/hw/i2c.c
+++ b/hw/i2c.c
@@ -76,7 +76,7 @@
     DeviceState *qdev;
     i2c_slave *slave = NULL;
 
-    LIST_FOREACH(qdev, &bus->qbus.children, sibling) {
+    QLIST_FOREACH(qdev, &bus->qbus.children, sibling) {
         slave = I2C_SLAVE_FROM_QDEV(qdev);
         if (slave->address == address)
             break;
diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
index 5348dd1..f3dc421 100644
--- a/hw/pci-hotplug.c
+++ b/hw/pci-hotplug.c
@@ -84,7 +84,7 @@
     switch (type) {
     case IF_SCSI:
         success = 1;
-        scsibus = LIST_FIRST(&dev->qdev.child_bus);
+        scsibus = QLIST_FIRST(&dev->qdev.child_bus);
         scsi_bus_legacy_add_drive(DO_UPCAST(SCSIBus, qbus, scsibus),
                                   dinfo, dinfo->unit);
         break;
diff --git a/hw/qdev.c b/hw/qdev.c
index 6451b8a..43b1beb 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -101,7 +101,7 @@
     qdev_prop_set_defaults(dev, dev->info->props);
     qdev_prop_set_defaults(dev, dev->parent_bus->info->props);
     qdev_prop_set_compat(dev);
-    LIST_INSERT_HEAD(&bus->children, dev, sibling);
+    QLIST_INSERT_HEAD(&bus->children, dev, sibling);
     return dev;
 }
 
@@ -235,7 +235,7 @@
 #endif
     if (dev->info->reset)
         qemu_unregister_reset(dev->info->reset, dev);
-    LIST_REMOVE(dev, sibling);
+    QLIST_REMOVE(dev, sibling);
     qemu_free(dev);
 }
 
@@ -321,7 +321,7 @@
 {
     BusState *bus;
 
-    LIST_FOREACH(bus, &dev->child_bus, sibling) {
+    QLIST_FOREACH(bus, &dev->child_bus, sibling) {
         if (strcmp(name, bus->name) == 0) {
             return bus;
         }
@@ -346,8 +346,8 @@
         return bus;
     }
 
-    LIST_FOREACH(dev, &bus->children, sibling) {
-        LIST_FOREACH(child, &dev->child_bus, sibling) {
+    QLIST_FOREACH(dev, &bus->children, sibling) {
+        QLIST_FOREACH(child, &dev->child_bus, sibling) {
             ret = qbus_find_recursive(child, name, info);
             if (ret) {
                 return ret;
@@ -365,7 +365,7 @@
 
     pos += snprintf(dest+pos, len-pos,"child busses at \"%s\":",
                     dev->id ? dev->id : dev->info->name);
-    LIST_FOREACH(child, &dev->child_bus, sibling) {
+    QLIST_FOREACH(child, &dev->child_bus, sibling) {
         pos += snprintf(dest+pos, len-pos, "%s\"%s\"", sep, child->name);
         sep = ", ";
     }
@@ -379,7 +379,7 @@
 
     pos += snprintf(dest+pos, len-pos, "devices at \"%s\":",
                     bus->name);
-    LIST_FOREACH(dev, &bus->children, sibling) {
+    QLIST_FOREACH(dev, &bus->children, sibling) {
         pos += snprintf(dest+pos, len-pos, "%s\"%s\"",
                         sep, dev->info->name);
         if (dev->id)
@@ -392,7 +392,7 @@
 {
     BusState *child;
 
-    LIST_FOREACH(child, &dev->child_bus, sibling) {
+    QLIST_FOREACH(child, &dev->child_bus, sibling) {
         if (strcmp(child->name, elem) == 0) {
             return child;
         }
@@ -410,17 +410,17 @@
      *   (2) driver name
      *   (3) driver alias, if present
      */
-    LIST_FOREACH(dev, &bus->children, sibling) {
+    QLIST_FOREACH(dev, &bus->children, sibling) {
         if (dev->id  &&  strcmp(dev->id, elem) == 0) {
             return dev;
         }
     }
-    LIST_FOREACH(dev, &bus->children, sibling) {
+    QLIST_FOREACH(dev, &bus->children, sibling) {
         if (strcmp(dev->info->name, elem) == 0) {
             return dev;
         }
     }
-    LIST_FOREACH(dev, &bus->children, sibling) {
+    QLIST_FOREACH(dev, &bus->children, sibling) {
         if (dev->info->alias && strcmp(dev->info->alias, elem) == 0) {
             return dev;
         }
@@ -478,7 +478,7 @@
                 qemu_error("device has no child bus (%s)\n", path);
                 return NULL;
             case 1:
-                return LIST_FIRST(&dev->child_bus);
+                return QLIST_FIRST(&dev->child_bus);
             default:
                 qbus_list_bus(dev, msg, sizeof(msg));
                 qemu_error("device has multiple child busses (%s)\n%s\n",
@@ -532,9 +532,9 @@
         bus->name = buf;
     }
 
-    LIST_INIT(&bus->children);
+    QLIST_INIT(&bus->children);
     if (parent) {
-        LIST_INSERT_HEAD(&parent->child_bus, bus, sibling);
+        QLIST_INSERT_HEAD(&parent->child_bus, bus, sibling);
         parent->num_child_bus++;
     }
     return bus;
@@ -575,7 +575,7 @@
     qdev_print_props(mon, dev, dev->parent_bus->info->props, "bus", indent);
     if (dev->parent_bus->info->print_dev)
         dev->parent_bus->info->print_dev(mon, dev, indent);
-    LIST_FOREACH(child, &dev->child_bus, sibling) {
+    QLIST_FOREACH(child, &dev->child_bus, sibling) {
         qbus_print(mon, child, indent);
     }
 }
@@ -587,7 +587,7 @@
     qdev_printf("bus: %s\n", bus->name);
     indent += 2;
     qdev_printf("type %s\n", bus->info->name);
-    LIST_FOREACH(dev, &bus->children, sibling) {
+    QLIST_FOREACH(dev, &bus->children, sibling) {
         qdev_print(mon, dev, indent);
     }
 }
diff --git a/hw/qdev.h b/hw/qdev.h
index c2609b4..623ded5 100644
--- a/hw/qdev.h
+++ b/hw/qdev.h
@@ -3,7 +3,7 @@
 
 #include "hw.h"
 #include "sysemu.h"
-#include "sys-queue.h"
+#include "qemu-queue.h"
 #include "qemu-char.h"
 #include "qemu-option.h"
 
@@ -29,10 +29,10 @@
     qemu_irq *gpio_out;
     int num_gpio_in;
     qemu_irq *gpio_in;
-    LIST_HEAD(, BusState) child_bus;
+    QLIST_HEAD(, BusState) child_bus;
     int num_child_bus;
     NICInfo *nd;
-    LIST_ENTRY(DeviceState) sibling;
+    QLIST_ENTRY(DeviceState) sibling;
 };
 
 typedef void (*bus_dev_printfn)(Monitor *mon, DeviceState *dev, int indent);
@@ -47,8 +47,8 @@
     DeviceState *parent;
     BusInfo *info;
     const char *name;
-    LIST_HEAD(, DeviceState) children;
-    LIST_ENTRY(BusState) sibling;
+    QLIST_HEAD(, DeviceState) children;
+    QLIST_ENTRY(BusState) sibling;
 };
 
 struct Property {
diff --git a/hw/ssi.c b/hw/ssi.c
index 54ad1a1..73cb541 100644
--- a/hw/ssi.c
+++ b/hw/ssi.c
@@ -25,8 +25,8 @@
     SSIBus *bus;
 
     bus = FROM_QBUS(SSIBus, qdev_get_parent_bus(dev));
-    if (LIST_FIRST(&bus->qbus.children) != dev
-        || LIST_NEXT(dev, sibling) != NULL) {
+    if (QLIST_FIRST(&bus->qbus.children) != dev
+        || QLIST_NEXT(dev, sibling) != NULL) {
         hw_error("Too many devices on SSI bus");
     }
 
@@ -61,7 +61,7 @@
 {
     DeviceState *dev;
     SSISlave *slave;
-    dev = LIST_FIRST(&bus->qbus.children);
+    dev = QLIST_FIRST(&bus->qbus.children);
     if (!dev) {
         return 0;
     }
diff --git a/hw/usb-bus.c b/hw/usb-bus.c
index 169fb2f..03933f1 100644
--- a/hw/usb-bus.c
+++ b/hw/usb-bus.c
@@ -12,7 +12,7 @@
     .print_dev = usb_bus_dev_print,
 };
 static int next_usb_bus = 0;
-static TAILQ_HEAD(, USBBus) busses = TAILQ_HEAD_INITIALIZER(busses);
+static QTAILQ_HEAD(, USBBus) busses = QTAILQ_HEAD_INITIALIZER(busses);
 
 USBBus *usb_bus_new(DeviceState *host)
 {
@@ -20,9 +20,9 @@
 
     bus = FROM_QBUS(USBBus, qbus_create(&usb_bus_info, host, NULL));
     bus->busnr = next_usb_bus++;
-    TAILQ_INIT(&bus->free);
-    TAILQ_INIT(&bus->used);
-    TAILQ_INSERT_TAIL(&busses, bus, next);
+    QTAILQ_INIT(&bus->free);
+    QTAILQ_INIT(&bus->used);
+    QTAILQ_INSERT_TAIL(&busses, bus, next);
     return bus;
 }
 
@@ -31,8 +31,8 @@
     USBBus *bus;
 
     if (-1 == busnr)
-        return TAILQ_FIRST(&busses);
-    TAILQ_FOREACH(bus, &busses, next) {
+        return QTAILQ_FIRST(&busses);
+    QTAILQ_FOREACH(bus, &busses, next) {
         if (bus->busnr == busnr)
             return bus;
     }
@@ -100,7 +100,7 @@
     port->opaque = opaque;
     port->index = index;
     port->attach = attach;
-    TAILQ_INSERT_TAIL(&bus->free, port, next);
+    QTAILQ_INSERT_TAIL(&bus->free, port, next);
     bus->nfree++;
 }
 
@@ -116,13 +116,13 @@
     }
     dev->attached++;
 
-    port = TAILQ_FIRST(&bus->free);
-    TAILQ_REMOVE(&bus->free, port, next);
+    port = QTAILQ_FIRST(&bus->free);
+    QTAILQ_REMOVE(&bus->free, port, next);
     bus->nfree--;
 
     usb_attach(port, dev);
 
-    TAILQ_INSERT_TAIL(&bus->used, port, next);
+    QTAILQ_INSERT_TAIL(&bus->used, port, next);
     bus->nused++;
 }
 
@@ -149,7 +149,7 @@
     if (!bus)
         return -1;
 
-    TAILQ_FOREACH(port, &bus->used, next) {
+    QTAILQ_FOREACH(port, &bus->used, next) {
         if (port->dev->addr == addr)
             break;
     }
@@ -157,13 +157,13 @@
         return -1;
 
     dev = port->dev;
-    TAILQ_REMOVE(&bus->used, port, next);
+    QTAILQ_REMOVE(&bus->used, port, next);
     bus->nused--;
 
     usb_attach(port, NULL);
     dev->info->handle_destroy(dev);
 
-    TAILQ_INSERT_TAIL(&bus->free, port, next);
+    QTAILQ_INSERT_TAIL(&bus->free, port, next);
     bus->nfree++;
     return 0;
 }
@@ -196,13 +196,13 @@
     USBDevice *dev;
     USBPort *port;
 
-    if (TAILQ_EMPTY(&busses)) {
+    if (QTAILQ_EMPTY(&busses)) {
         monitor_printf(mon, "USB support not enabled\n");
         return;
     }
 
-    TAILQ_FOREACH(bus, &busses, next) {
-        TAILQ_FOREACH(port, &bus->used, next) {
+    QTAILQ_FOREACH(bus, &busses, next) {
+        QTAILQ_FOREACH(port, &bus->used, next) {
             dev = port->dev;
             if (!dev)
                 continue;
diff --git a/hw/usb-net.c b/hw/usb-net.c
index f19309e..b33e329 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 @@
 #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 @@
 
     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 @@
     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 @@
     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 @@
     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 @@
 
     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 */
diff --git a/hw/usb.h b/hw/usb.h
index 3632639..7c5cf83 100644
--- a/hw/usb.h
+++ b/hw/usb.h
@@ -24,7 +24,7 @@
 
 #include "block.h"
 #include "qdev.h"
-#include "sys-queue.h"
+#include "qemu-queue.h"
 
 #define USB_TOKEN_SETUP 0x2d
 #define USB_TOKEN_IN    0x69 /* device -> host */
@@ -193,7 +193,7 @@
     usb_attachfn attach;
     void *opaque;
     int index; /* internal port index, may be used with the opaque */
-    TAILQ_ENTRY(USBPort) next;
+    QTAILQ_ENTRY(USBPort) next;
 };
 
 typedef void USBCallback(USBPacket * packet, void *opaque);
@@ -298,9 +298,9 @@
     int busnr;
     int nfree;
     int nused;
-    TAILQ_HEAD(, USBPort) free;
-    TAILQ_HEAD(, USBPort) used;
-    TAILQ_ENTRY(USBBus) next;
+    QTAILQ_HEAD(, USBPort) free;
+    QTAILQ_HEAD(, USBPort) used;
+    QTAILQ_ENTRY(USBBus) next;
 };
 
 USBBus *usb_bus_new(DeviceState *host);
diff --git a/hw/watchdog.c b/hw/watchdog.c
index adba872..6a3d1b4 100644
--- a/hw/watchdog.c
+++ b/hw/watchdog.c
@@ -22,7 +22,7 @@
 #include "qemu-common.h"
 #include "qemu-option.h"
 #include "qemu-config.h"
-#include "sys-queue.h"
+#include "qemu-queue.h"
 #include "sysemu.h"
 #include "hw/watchdog.h"
 
@@ -35,11 +35,11 @@
 #define WDT_NONE         6	/* Do nothing. */
 
 static int watchdog_action = WDT_RESET;
-static LIST_HEAD(watchdog_list, WatchdogTimerModel) watchdog_list;
+static QLIST_HEAD(watchdog_list, WatchdogTimerModel) watchdog_list;
 
 void watchdog_add_model(WatchdogTimerModel *model)
 {
-    LIST_INSERT_HEAD(&watchdog_list, model, entry);
+    QLIST_INSERT_HEAD(&watchdog_list, model, entry);
 }
 
 /* Returns:
@@ -54,14 +54,14 @@
 
     /* -watchdog ? lists available devices and exits cleanly. */
     if (strcmp(p, "?") == 0) {
-        LIST_FOREACH(model, &watchdog_list, entry) {
+        QLIST_FOREACH(model, &watchdog_list, entry) {
             fprintf(stderr, "\t%s\t%s\n",
                      model->wdt_name, model->wdt_description);
         }
         return 2;
     }
 
-    LIST_FOREACH(model, &watchdog_list, entry) {
+    QLIST_FOREACH(model, &watchdog_list, entry) {
         if (strcasecmp(model->wdt_name, p) == 0) {
             /* add the device */
             opts = qemu_opts_create(&qemu_device_opts, NULL, 0);
@@ -71,7 +71,7 @@
     }
 
     fprintf(stderr, "Unknown -watchdog device. Supported devices are:\n");
-    LIST_FOREACH(model, &watchdog_list, entry) {
+    QLIST_FOREACH(model, &watchdog_list, entry) {
         fprintf(stderr, "\t%s\t%s\n",
                  model->wdt_name, model->wdt_description);
     }
diff --git a/hw/watchdog.h b/hw/watchdog.h
index 8c54fa4..330062c 100644
--- a/hw/watchdog.h
+++ b/hw/watchdog.h
@@ -23,7 +23,7 @@
 #define QEMU_WATCHDOG_H
 
 struct WatchdogTimerModel {
-    LIST_ENTRY(WatchdogTimerModel) entry;
+    QLIST_ENTRY(WatchdogTimerModel) entry;
 
     /* Short name of the device - used to select it on the command line. */
     const char *wdt_name;
diff --git a/hw/xen_backend.c b/hw/xen_backend.c
index efafd2f..658ea8d 100644
--- a/hw/xen_backend.c
+++ b/hw/xen_backend.c
@@ -48,7 +48,7 @@
 const char *xen_protocol;
 
 /* private */
-static TAILQ_HEAD(XenDeviceHead, XenDevice) xendevs = TAILQ_HEAD_INITIALIZER(xendevs);
+static QTAILQ_HEAD(XenDeviceHead, XenDevice) xendevs = QTAILQ_HEAD_INITIALIZER(xendevs);
 static int debug = 0;
 
 /* ------------------------------------------------------------- */
@@ -165,7 +165,7 @@
 {
     struct XenDevice *xendev;
 
-    TAILQ_FOREACH(xendev, &xendevs, next) {
+    QTAILQ_FOREACH(xendev, &xendevs, next) {
 	if (xendev->dom != dom)
 	    continue;
 	if (xendev->dev != dev)
@@ -227,7 +227,7 @@
 	xendev->gnttabdev = -1;
     }
 
-    TAILQ_INSERT_TAIL(&xendevs, xendev, next);
+    QTAILQ_INSERT_TAIL(&xendevs, xendev, next);
 
     if (xendev->ops->alloc)
 	xendev->ops->alloc(xendev);
@@ -243,7 +243,7 @@
     struct XenDevice *xendev, *xnext;
 
     /*
-     * This is pretty much like TAILQ_FOREACH(xendev, &xendevs, next) but
+     * This is pretty much like QTAILQ_FOREACH(xendev, &xendevs, next) but
      * we save the next pointer in xnext because we might free xendev.
      */
     xnext = xendevs.tqh_first;
@@ -271,7 +271,7 @@
 	if (xendev->gnttabdev >= 0)
 	    xc_gnttab_close(xendev->gnttabdev);
 
-	TAILQ_REMOVE(&xendevs, xendev, next);
+	QTAILQ_REMOVE(&xendevs, xendev, next);
 	qemu_free(xendev);
     }
     return NULL;
diff --git a/hw/xen_backend.h b/hw/xen_backend.h
index 4dbfdb4..f07f7d4 100644
--- a/hw/xen_backend.h
+++ b/hw/xen_backend.h
@@ -50,7 +50,7 @@
     int                gnttabdev;
 
     struct XenDevOps   *ops;
-    TAILQ_ENTRY(XenDevice) next;
+    QTAILQ_ENTRY(XenDevice) next;
 };
 
 /* ------------------------------------------------------------- */
diff --git a/hw/xen_devconfig.c b/hw/xen_devconfig.c
index 4121188..ea8f8c4 100644
--- a/hw/xen_devconfig.c
+++ b/hw/xen_devconfig.c
@@ -4,9 +4,9 @@
 
 struct xs_dirs {
     char *xs_dir;
-    TAILQ_ENTRY(xs_dirs) list;
+    QTAILQ_ENTRY(xs_dirs) list;
 };
-static TAILQ_HEAD(xs_dirs_head, xs_dirs) xs_cleanup = TAILQ_HEAD_INITIALIZER(xs_cleanup);
+static QTAILQ_HEAD(xs_dirs_head, xs_dirs) xs_cleanup = QTAILQ_HEAD_INITIALIZER(xs_cleanup);
 
 static void xen_config_cleanup_dir(char *dir)
 {
@@ -14,14 +14,14 @@
 
     d = qemu_malloc(sizeof(*d));
     d->xs_dir = dir;
-    TAILQ_INSERT_TAIL(&xs_cleanup, d, list);
+    QTAILQ_INSERT_TAIL(&xs_cleanup, d, list);
 }
 
 void xen_config_cleanup(void)
 {
     struct xs_dirs *d;
 
-    TAILQ_FOREACH(d, &xs_cleanup, list) {
+    QTAILQ_FOREACH(d, &xs_cleanup, list) {
 	xs_rm(xenstore, 0, d->xs_dir);
     }
 }
diff --git a/hw/xen_disk.c b/hw/xen_disk.c
index 100ef8e..74cde80 100644
--- a/hw/xen_disk.c
+++ b/hw/xen_disk.c
@@ -77,7 +77,7 @@
     int                 aio_errors;
 
     struct XenBlkDev    *blkdev;
-    LIST_ENTRY(ioreq)   list;
+    QLIST_ENTRY(ioreq)   list;
 };
 
 struct XenBlkDev {
@@ -99,9 +99,9 @@
     int                 cnt_map;
 
     /* request lists */
-    LIST_HEAD(inflight_head, ioreq) inflight;
-    LIST_HEAD(finished_head, ioreq) finished;
-    LIST_HEAD(freelist_head, ioreq) freelist;
+    QLIST_HEAD(inflight_head, ioreq) inflight;
+    QLIST_HEAD(finished_head, ioreq) finished;
+    QLIST_HEAD(freelist_head, ioreq) freelist;
     int                 requests_total;
     int                 requests_inflight;
     int                 requests_finished;
@@ -118,7 +118,7 @@
 {
     struct ioreq *ioreq = NULL;
 
-    if (LIST_EMPTY(&blkdev->freelist)) {
+    if (QLIST_EMPTY(&blkdev->freelist)) {
 	if (blkdev->requests_total >= max_requests)
 	    goto out;
 	/* allocate new struct */
@@ -128,11 +128,11 @@
         qemu_iovec_init(&ioreq->v, BLKIF_MAX_SEGMENTS_PER_REQUEST);
     } else {
 	/* get one from freelist */
-	ioreq = LIST_FIRST(&blkdev->freelist);
-	LIST_REMOVE(ioreq, list);
+	ioreq = QLIST_FIRST(&blkdev->freelist);
+	QLIST_REMOVE(ioreq, list);
         qemu_iovec_reset(&ioreq->v);
     }
-    LIST_INSERT_HEAD(&blkdev->inflight, ioreq, list);
+    QLIST_INSERT_HEAD(&blkdev->inflight, ioreq, list);
     blkdev->requests_inflight++;
 
 out:
@@ -143,8 +143,8 @@
 {
     struct XenBlkDev *blkdev = ioreq->blkdev;
 
-    LIST_REMOVE(ioreq, list);
-    LIST_INSERT_HEAD(&blkdev->finished, ioreq, list);
+    QLIST_REMOVE(ioreq, list);
+    QLIST_INSERT_HEAD(&blkdev->finished, ioreq, list);
     blkdev->requests_inflight--;
     blkdev->requests_finished++;
 }
@@ -153,10 +153,10 @@
 {
     struct XenBlkDev *blkdev = ioreq->blkdev;
 
-    LIST_REMOVE(ioreq, list);
+    QLIST_REMOVE(ioreq, list);
     memset(ioreq, 0, sizeof(*ioreq));
     ioreq->blkdev = blkdev;
-    LIST_INSERT_HEAD(&blkdev->freelist, ioreq, list);
+    QLIST_INSERT_HEAD(&blkdev->freelist, ioreq, list);
     blkdev->requests_finished--;
 }
 
@@ -476,8 +476,8 @@
     struct ioreq *ioreq;
     int send_notify = 0;
 
-    while (!LIST_EMPTY(&blkdev->finished)) {
-        ioreq = LIST_FIRST(&blkdev->finished);
+    while (!QLIST_EMPTY(&blkdev->finished)) {
+        ioreq = QLIST_FIRST(&blkdev->finished);
 	send_notify += blk_send_response_one(ioreq);
 	ioreq_release(ioreq);
     }
@@ -564,9 +564,9 @@
 {
     struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, xendev);
 
-    LIST_INIT(&blkdev->inflight);
-    LIST_INIT(&blkdev->finished);
-    LIST_INIT(&blkdev->freelist);
+    QLIST_INIT(&blkdev->inflight);
+    QLIST_INIT(&blkdev->finished);
+    QLIST_INIT(&blkdev->freelist);
     blkdev->bh = qemu_bh_new(blk_bh, blkdev);
     if (xen_mode != XEN_EMULATE)
         batch_maps = 1;
@@ -750,9 +750,9 @@
     struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, xendev);
     struct ioreq *ioreq;
 
-    while (!LIST_EMPTY(&blkdev->freelist)) {
-	ioreq = LIST_FIRST(&blkdev->freelist);
-        LIST_REMOVE(ioreq, list);
+    while (!QLIST_EMPTY(&blkdev->freelist)) {
+	ioreq = QLIST_FIRST(&blkdev->freelist);
+        QLIST_REMOVE(ioreq, list);
         qemu_iovec_destroy(&ioreq->v);
 	qemu_free(ioreq);
     }
diff --git a/kvm-all.c b/kvm-all.c
index 15c30d4..ac57984 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -428,7 +428,7 @@
     s = qemu_mallocz(sizeof(KVMState));
 
 #ifdef KVM_CAP_SET_GUEST_DEBUG
-    TAILQ_INIT(&s->kvm_sw_breakpoints);
+    QTAILQ_INIT(&s->kvm_sw_breakpoints);
 #endif
     for (i = 0; i < ARRAY_SIZE(s->slots); i++)
         s->slots[i].slot = i;
@@ -917,7 +917,7 @@
 {
     struct kvm_sw_breakpoint *bp;
 
-    TAILQ_FOREACH(bp, &env->kvm_state->kvm_sw_breakpoints, entry) {
+    QTAILQ_FOREACH(bp, &env->kvm_state->kvm_sw_breakpoints, entry) {
         if (bp->pc == pc)
             return bp;
     }
@@ -926,7 +926,7 @@
 
 int kvm_sw_breakpoints_active(CPUState *env)
 {
-    return !TAILQ_EMPTY(&env->kvm_state->kvm_sw_breakpoints);
+    return !QTAILQ_EMPTY(&env->kvm_state->kvm_sw_breakpoints);
 }
 
 struct kvm_set_guest_debug_data {
@@ -983,7 +983,7 @@
             return err;
         }
 
-        TAILQ_INSERT_HEAD(&current_env->kvm_state->kvm_sw_breakpoints,
+        QTAILQ_INSERT_HEAD(&current_env->kvm_state->kvm_sw_breakpoints,
                           bp, entry);
     } else {
         err = kvm_arch_insert_hw_breakpoint(addr, len, type);
@@ -1020,7 +1020,7 @@
         if (err)
             return err;
 
-        TAILQ_REMOVE(&current_env->kvm_state->kvm_sw_breakpoints, bp, entry);
+        QTAILQ_REMOVE(&current_env->kvm_state->kvm_sw_breakpoints, bp, entry);
         qemu_free(bp);
     } else {
         err = kvm_arch_remove_hw_breakpoint(addr, len, type);
@@ -1042,7 +1042,7 @@
     KVMState *s = current_env->kvm_state;
     CPUState *env;
 
-    TAILQ_FOREACH_SAFE(bp, &s->kvm_sw_breakpoints, entry, next) {
+    QTAILQ_FOREACH_SAFE(bp, &s->kvm_sw_breakpoints, entry, next) {
         if (kvm_arch_remove_sw_breakpoint(current_env, bp) != 0) {
             /* Try harder to find a CPU that currently sees the breakpoint. */
             for (env = first_cpu; env != NULL; env = env->next_cpu) {
diff --git a/kvm.h b/kvm.h
index dbe825f..e7d5beb 100644
--- a/kvm.h
+++ b/kvm.h
@@ -15,7 +15,7 @@
 #define QEMU_KVM_H
 
 #include "config.h"
-#include "sys-queue.h"
+#include "qemu-queue.h"
 
 #ifdef CONFIG_KVM
 extern int kvm_allowed;
@@ -100,10 +100,10 @@
     target_ulong pc;
     target_ulong saved_insn;
     int use_count;
-    TAILQ_ENTRY(kvm_sw_breakpoint) entry;
+    QTAILQ_ENTRY(kvm_sw_breakpoint) entry;
 };
 
-TAILQ_HEAD(kvm_sw_breakpoint_head, kvm_sw_breakpoint);
+QTAILQ_HEAD(kvm_sw_breakpoint_head, kvm_sw_breakpoint);
 
 int kvm_arch_debug(struct kvm_debug_exit_arch *arch_info);
 
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 4f04b98..10d4781 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -1844,7 +1844,7 @@
 
 /* Here is the structure in which status of each thread is captured. */
 struct elf_thread_status {
-    TAILQ_ENTRY(elf_thread_status)  ets_link;
+    QTAILQ_ENTRY(elf_thread_status)  ets_link;
     struct target_elf_prstatus prstatus;   /* NT_PRSTATUS */
 #if 0
     elf_fpregset_t fpu;             /* NT_PRFPREG */
@@ -1860,7 +1860,7 @@
     struct target_elf_prstatus *prstatus;  /* NT_PRSTATUS */
     struct target_elf_prpsinfo *psinfo;    /* NT_PRPSINFO */
 
-    TAILQ_HEAD(thread_list_head, elf_thread_status) thread_list;
+    QTAILQ_HEAD(thread_list_head, elf_thread_status) thread_list;
 #if 0
     /*
      * Current version of ELF coredump doesn't support
@@ -1878,11 +1878,11 @@
     abi_ulong   vma_start;  /* start vaddr of memory region */
     abi_ulong   vma_end;    /* end vaddr of memory region */
     abi_ulong   vma_flags;  /* protection etc. flags for the region */
-    TAILQ_ENTRY(vm_area_struct) vma_link;
+    QTAILQ_ENTRY(vm_area_struct) vma_link;
 };
 
 struct mm_struct {
-    TAILQ_HEAD(, vm_area_struct) mm_mmap;
+    QTAILQ_HEAD(, vm_area_struct) mm_mmap;
     int mm_count;           /* number of mappings */
 };
 
@@ -1962,7 +1962,7 @@
         return (NULL);
 
     mm->mm_count = 0;
-    TAILQ_INIT(&mm->mm_mmap);
+    QTAILQ_INIT(&mm->mm_mmap);
 
     return (mm);
 }
@@ -1972,7 +1972,7 @@
     struct vm_area_struct *vma;
 
     while ((vma = vma_first(mm)) != NULL) {
-        TAILQ_REMOVE(&mm->mm_mmap, vma, vma_link);
+        QTAILQ_REMOVE(&mm->mm_mmap, vma, vma_link);
         qemu_free(vma);
     }
     qemu_free(mm);
@@ -1990,7 +1990,7 @@
     vma->vma_end = end;
     vma->vma_flags = flags;
 
-    TAILQ_INSERT_TAIL(&mm->mm_mmap, vma, vma_link);
+    QTAILQ_INSERT_TAIL(&mm->mm_mmap, vma, vma_link);
     mm->mm_count++;
 
     return (0);
@@ -1998,12 +1998,12 @@
 
 static struct vm_area_struct *vma_first(const struct mm_struct *mm)
 {
-    return (TAILQ_FIRST(&mm->mm_mmap));
+    return (QTAILQ_FIRST(&mm->mm_mmap));
 }
 
 static struct vm_area_struct *vma_next(struct vm_area_struct *vma)
 {
-    return (TAILQ_NEXT(vma, vma_link));
+    return (QTAILQ_NEXT(vma, vma_link));
 }
 
 static int vma_get_mapping_count(const struct mm_struct *mm)
@@ -2328,7 +2328,7 @@
     fill_note(&ets->notes[0], "CORE", NT_PRSTATUS, sizeof (ets->prstatus),
         &ets->prstatus);
 
-    TAILQ_INSERT_TAIL(&info->thread_list, ets, ets_link);
+    QTAILQ_INSERT_TAIL(&info->thread_list, ets, ets_link);
 
     info->notes_size += note_size(&ets->notes[0]);
 }
@@ -2343,7 +2343,7 @@
 
     (void) memset(info, 0, sizeof (*info));
 
-    TAILQ_INIT(&info->thread_list);
+    QTAILQ_INIT(&info->thread_list);
 
     info->notes = qemu_mallocz(NUMNOTES * sizeof (struct memelfnote));
     if (info->notes == NULL)
@@ -2389,9 +2389,9 @@
 {
     struct elf_thread_status *ets;
 
-    while (!TAILQ_EMPTY(&info->thread_list)) {
-        ets = TAILQ_FIRST(&info->thread_list);
-        TAILQ_REMOVE(&info->thread_list, ets, ets_link);
+    while (!QTAILQ_EMPTY(&info->thread_list)) {
+        ets = QTAILQ_FIRST(&info->thread_list);
+        QTAILQ_REMOVE(&info->thread_list, ets, ets_link);
         qemu_free(ets);
     }
 
diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index def620f..d129deb 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -18,7 +18,7 @@
 #include "syscall.h"
 #include "target_signal.h"
 #include "gdbstub.h"
-#include "sys-queue.h"
+#include "qemu-queue.h"
 
 #if defined(CONFIG_USE_NPTL)
 #define THREAD __thread
diff --git a/module.c b/module.c
index 3729283..e77d569 100644
--- a/module.c
+++ b/module.c
@@ -12,17 +12,17 @@
  */
 
 #include "qemu-common.h"
-#include "sys-queue.h"
+#include "qemu-queue.h"
 #include "module.h"
 
 typedef struct ModuleEntry
 {
     module_init_type type;
     void (*init)(void);
-    TAILQ_ENTRY(ModuleEntry) node;
+    QTAILQ_ENTRY(ModuleEntry) node;
 } ModuleEntry;
 
-typedef TAILQ_HEAD(, ModuleEntry) ModuleTypeList;
+typedef QTAILQ_HEAD(, ModuleEntry) ModuleTypeList;
 
 static ModuleTypeList init_type_list[MODULE_INIT_MAX];
 
@@ -36,7 +36,7 @@
     }
 
     for (i = 0; i < MODULE_INIT_MAX; i++) {
-        TAILQ_INIT(&init_type_list[i]);
+        QTAILQ_INIT(&init_type_list[i]);
     }
 
     inited = 1;
@@ -64,7 +64,7 @@
 
     l = find_type(type);
 
-    TAILQ_INSERT_TAIL(l, e, node);
+    QTAILQ_INSERT_TAIL(l, e, node);
 }
 
 void module_call_init(module_init_type type)
@@ -74,7 +74,7 @@
 
     l = find_type(type);
 
-    TAILQ_FOREACH(e, l, node) {
+    QTAILQ_FOREACH(e, l, node) {
         e->init();
     }
 }
diff --git a/monitor.c b/monitor.c
index a88cdc9..18bcc92 100644
--- a/monitor.c
+++ b/monitor.c
@@ -80,7 +80,7 @@
 struct mon_fd_t {
     char *name;
     int fd;
-    LIST_ENTRY(mon_fd_t) next;
+    QLIST_ENTRY(mon_fd_t) next;
 };
 
 struct Monitor {
@@ -95,11 +95,11 @@
     CPUState *mon_cpu;
     BlockDriverCompletionFunc *password_completion_cb;
     void *password_opaque;
-    LIST_HEAD(,mon_fd_t) fds;
-    LIST_ENTRY(Monitor) entry;
+    QLIST_HEAD(,mon_fd_t) fds;
+    QLIST_ENTRY(Monitor) entry;
 };
 
-static LIST_HEAD(mon_list, Monitor) mon_list;
+static QLIST_HEAD(mon_list, Monitor) mon_list;
 
 static const mon_cmd_t mon_cmds[];
 static const mon_cmd_t info_cmds[];
@@ -270,7 +270,7 @@
     const char *device = qdict_get_str(qdict, "device");
 
     all_devices = !strcmp(device, "all");
-    TAILQ_FOREACH(dinfo, &drives, next) {
+    QTAILQ_FOREACH(dinfo, &drives, next) {
         if (!all_devices)
             if (strcmp(bdrv_get_device_name(dinfo->bdrv), device))
                 continue;
@@ -1477,7 +1477,7 @@
 #endif
 
 /* Capture support */
-static LIST_HEAD (capture_list_head, CaptureState) capture_head;
+static QLIST_HEAD (capture_list_head, CaptureState) capture_head;
 
 static void do_info_capture(Monitor *mon)
 {
@@ -1500,7 +1500,7 @@
     for (s = capture_head.lh_first, i = 0; s; s = s->entries.le_next, ++i) {
         if (i == n) {
             s->ops.destroy (s->opaque);
-            LIST_REMOVE (s, entries);
+            QLIST_REMOVE (s, entries);
             qemu_free (s);
             return;
         }
@@ -1528,7 +1528,7 @@
         monitor_printf(mon, "Faied to add wave capture\n");
         qemu_free (s);
     }
-    LIST_INSERT_HEAD (&capture_head, s, entries);
+    QLIST_INSERT_HEAD (&capture_head, s, entries);
 }
 #endif
 
@@ -1600,7 +1600,7 @@
     if (acl) {
         monitor_printf(mon, "policy: %s\n",
                        acl->defaultDeny ? "deny" : "allow");
-        TAILQ_FOREACH(entry, &acl->entries, next) {
+        QTAILQ_FOREACH(entry, &acl->entries, next) {
             i++;
             monitor_printf(mon, "%d: %s %s\n", i,
                            entry->deny ? "deny" : "allow", entry->match);
@@ -1729,7 +1729,7 @@
         return;
     }
 
-    LIST_FOREACH(monfd, &mon->fds, next) {
+    QLIST_FOREACH(monfd, &mon->fds, next) {
         if (strcmp(monfd->name, fdname) != 0) {
             continue;
         }
@@ -1743,7 +1743,7 @@
     monfd->name = qemu_strdup(fdname);
     monfd->fd = fd;
 
-    LIST_INSERT_HEAD(&mon->fds, monfd, next);
+    QLIST_INSERT_HEAD(&mon->fds, monfd, next);
 }
 
 static void do_closefd(Monitor *mon, const QDict *qdict)
@@ -1751,12 +1751,12 @@
     const char *fdname = qdict_get_str(qdict, "fdname");
     mon_fd_t *monfd;
 
-    LIST_FOREACH(monfd, &mon->fds, next) {
+    QLIST_FOREACH(monfd, &mon->fds, next) {
         if (strcmp(monfd->name, fdname) != 0) {
             continue;
         }
 
-        LIST_REMOVE(monfd, next);
+        QLIST_REMOVE(monfd, next);
         close(monfd->fd);
         qemu_free(monfd->name);
         qemu_free(monfd);
@@ -1782,7 +1782,7 @@
 {
     mon_fd_t *monfd;
 
-    LIST_FOREACH(monfd, &mon->fds, next) {
+    QLIST_FOREACH(monfd, &mon->fds, next) {
         int fd;
 
         if (strcmp(monfd->name, fdname) != 0) {
@@ -1792,7 +1792,7 @@
         fd = monfd->fd;
 
         /* caller takes ownership of fd */
-        LIST_REMOVE(monfd, next);
+        QLIST_REMOVE(monfd, next);
         qemu_free(monfd->name);
         qemu_free(monfd);
 
@@ -3178,7 +3178,7 @@
     qemu_chr_add_handlers(chr, monitor_can_read, monitor_read, monitor_event,
                           mon);
 
-    LIST_INSERT_HEAD(&mon_list, mon, entry);
+    QLIST_INSERT_HEAD(&mon_list, mon, entry);
     if (!cur_mon || (flags & MONITOR_IS_DEFAULT))
         cur_mon = mon;
 }
diff --git a/net.c b/net.c
index 4510694..3fdf1e6 100644
--- a/net.c
+++ b/net.c
@@ -31,8 +31,6 @@
 
 /* Needed early for CONFIG_BSD etc. */
 #include "config-host.h"
-/* Needed early to override system queue definitions on BSD */
-#include "sys-queue.h"
 
 #ifndef _WIN32
 #include <sys/times.h>
@@ -114,6 +112,7 @@
 #include "qemu-log.h"
 
 #include "slirp/libslirp.h"
+#include "qemu-queue.h"
 
 
 static VLANState *first_vlan;
@@ -440,9 +439,9 @@
 {
     VLANPacket *packet, *next;
 
-    TAILQ_FOREACH_SAFE(packet, &vc->vlan->send_queue, entry, next) {
+    QTAILQ_FOREACH_SAFE(packet, &vc->vlan->send_queue, entry, next) {
         if (packet->sender == vc) {
-            TAILQ_REMOVE(&vc->vlan->send_queue, packet, entry);
+            QTAILQ_REMOVE(&vc->vlan->send_queue, packet, entry);
             qemu_free(packet);
         }
     }
@@ -450,16 +449,16 @@
 
 void qemu_flush_queued_packets(VLANClientState *vc)
 {
-    while (!TAILQ_EMPTY(&vc->vlan->send_queue)) {
+    while (!QTAILQ_EMPTY(&vc->vlan->send_queue)) {
         VLANPacket *packet;
         int ret;
 
-        packet = TAILQ_FIRST(&vc->vlan->send_queue);
-        TAILQ_REMOVE(&vc->vlan->send_queue, packet, entry);
+        packet = QTAILQ_FIRST(&vc->vlan->send_queue);
+        QTAILQ_REMOVE(&vc->vlan->send_queue, packet, entry);
 
         ret = qemu_deliver_packet(packet->sender, packet->data, packet->size);
         if (ret == 0 && packet->sent_cb != NULL) {
-            TAILQ_INSERT_HEAD(&vc->vlan->send_queue, packet, entry);
+            QTAILQ_INSERT_HEAD(&vc->vlan->send_queue, packet, entry);
             break;
         }
 
@@ -482,7 +481,7 @@
     packet->sent_cb = sent_cb;
     memcpy(packet->data, buf, size);
 
-    TAILQ_INSERT_TAIL(&sender->vlan->send_queue, packet, entry);
+    QTAILQ_INSERT_TAIL(&sender->vlan->send_queue, packet, entry);
 }
 
 ssize_t qemu_send_packet_async(VLANClientState *sender,
@@ -605,7 +604,7 @@
         packet->size += len;
     }
 
-    TAILQ_INSERT_TAIL(&sender->vlan->send_queue, packet, entry);
+    QTAILQ_INSERT_TAIL(&sender->vlan->send_queue, packet, entry);
 
     return packet->size;
 }
@@ -671,7 +670,7 @@
 };
 
 typedef struct SlirpState {
-    TAILQ_ENTRY(SlirpState) entry;
+    QTAILQ_ENTRY(SlirpState) entry;
     VLANClientState *vc;
     Slirp *slirp;
 #ifndef _WIN32
@@ -682,8 +681,8 @@
 static struct slirp_config_str *slirp_configs;
 const char *legacy_tftp_prefix;
 const char *legacy_bootp_filename;
-static TAILQ_HEAD(slirp_stacks, SlirpState) slirp_stacks =
-    TAILQ_HEAD_INITIALIZER(slirp_stacks);
+static QTAILQ_HEAD(slirp_stacks, SlirpState) slirp_stacks =
+    QTAILQ_HEAD_INITIALIZER(slirp_stacks);
 
 static void slirp_hostfwd(SlirpState *s, Monitor *mon, const char *redir_str,
                           int legacy_format);
@@ -736,7 +735,7 @@
 
     slirp_cleanup(s->slirp);
     slirp_smb_cleanup(s);
-    TAILQ_REMOVE(&slirp_stacks, s, entry);
+    QTAILQ_REMOVE(&slirp_stacks, s, entry);
     qemu_free(s);
 }
 
@@ -844,7 +843,7 @@
     s = qemu_mallocz(sizeof(SlirpState));
     s->slirp = slirp_init(restricted, net, mask, host, vhostname,
                           tftp_export, bootfile, dhcp, dns, s);
-    TAILQ_INSERT_TAIL(&slirp_stacks, s, entry);
+    QTAILQ_INSERT_TAIL(&slirp_stacks, s, entry);
 
     while (slirp_configs) {
         struct slirp_config_str *config = slirp_configs;
@@ -891,11 +890,11 @@
         }
         return vc->opaque;
     } else {
-        if (TAILQ_EMPTY(&slirp_stacks)) {
+        if (QTAILQ_EMPTY(&slirp_stacks)) {
             monitor_printf(mon, "user mode network stack not in use\n");
             return NULL;
         }
-        return TAILQ_FIRST(&slirp_stacks);
+        return QTAILQ_FIRST(&slirp_stacks);
     }
 }
 
@@ -946,7 +945,7 @@
 
     host_port = atoi(p);
 
-    err = slirp_remove_hostfwd(TAILQ_FIRST(&slirp_stacks)->slirp, is_udp,
+    err = slirp_remove_hostfwd(QTAILQ_FIRST(&slirp_stacks)->slirp, is_udp,
                                host_addr, host_port);
 
     monitor_printf(mon, "host forwarding rule for %s %s\n", src_str,
@@ -1045,7 +1044,7 @@
 {
     struct slirp_config_str *config;
 
-    if (TAILQ_EMPTY(&slirp_stacks)) {
+    if (QTAILQ_EMPTY(&slirp_stacks)) {
         config = qemu_malloc(sizeof(*config));
         pstrcpy(config->str, sizeof(config->str), redir_str);
         config->flags = SLIRP_CFG_HOSTFWD | SLIRP_CFG_LEGACY;
@@ -1054,7 +1053,7 @@
         return;
     }
 
-    slirp_hostfwd(TAILQ_FIRST(&slirp_stacks), NULL, redir_str, 1);
+    slirp_hostfwd(QTAILQ_FIRST(&slirp_stacks), NULL, redir_str, 1);
 }
 
 #ifndef _WIN32
@@ -1137,8 +1136,8 @@
         exit(1);
     }
     legacy_smb_export = exported_dir;
-    if (!TAILQ_EMPTY(&slirp_stacks)) {
-        slirp_smb(TAILQ_FIRST(&slirp_stacks), NULL, exported_dir,
+    if (!QTAILQ_EMPTY(&slirp_stacks)) {
+        slirp_smb(QTAILQ_FIRST(&slirp_stacks), NULL, exported_dir,
                   vserver_addr);
     }
 }
@@ -1233,7 +1232,7 @@
 {
     SlirpState *s;
 
-    TAILQ_FOREACH(s, &slirp_stacks, entry) {
+    QTAILQ_FOREACH(s, &slirp_stacks, entry) {
         monitor_printf(mon, "VLAN %d (%s):\n", s->vc->vlan->id, s->vc->name);
         slirp_connection_info(s->slirp, mon);
     }
@@ -2330,7 +2329,7 @@
     }
     vlan = qemu_mallocz(sizeof(VLANState));
     vlan->id = id;
-    TAILQ_INIT(&vlan->send_queue);
+    QTAILQ_INIT(&vlan->send_queue);
     vlan->next = NULL;
     pvlan = &first_vlan;
     while (*pvlan != NULL)
@@ -2594,7 +2593,7 @@
         qemu_free(smb_export);
         qemu_free(vsmbsrv);
     } else if (!strcmp(device, "channel")) {
-        if (TAILQ_EMPTY(&slirp_stacks)) {
+        if (QTAILQ_EMPTY(&slirp_stacks)) {
             struct slirp_config_str *config;
 
             config = qemu_malloc(sizeof(*config));
@@ -2603,7 +2602,7 @@
             config->next = slirp_configs;
             slirp_configs = config;
         } else {
-            slirp_guestfwd(TAILQ_FIRST(&slirp_stacks), mon, p, 1);
+            slirp_guestfwd(QTAILQ_FIRST(&slirp_stacks), mon, p, 1);
         }
         ret = 0;
     } else
diff --git a/net.h b/net.h
index f46e6c6..1479826 100644
--- a/net.h
+++ b/net.h
@@ -1,7 +1,7 @@
 #ifndef QEMU_NET_H
 #define QEMU_NET_H
 
-#include "sys-queue.h"
+#include "qemu-queue.h"
 #include "qemu-common.h"
 #include "qdict.h"
 
@@ -37,7 +37,7 @@
 typedef void (NetPacketSent) (VLANClientState *, ssize_t);
 
 struct VLANPacket {
-    TAILQ_ENTRY(VLANPacket) entry;
+    QTAILQ_ENTRY(VLANPacket) entry;
     VLANClientState *sender;
     int size;
     NetPacketSent *sent_cb;
@@ -49,7 +49,7 @@
     VLANClientState *first_client;
     struct VLANState *next;
     unsigned int nb_guest_devs, nb_host_devs;
-    TAILQ_HEAD(send_queue, VLANPacket) send_queue;
+    QTAILQ_HEAD(send_queue, VLANPacket) send_queue;
     int delivering;
 };
 
diff --git a/posix-aio-compat.c b/posix-aio-compat.c
index 8bb3d10..68cbec8 100644
--- a/posix-aio-compat.c
+++ b/posix-aio-compat.c
@@ -22,7 +22,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 
-#include "sys-queue.h"
+#include "qemu-queue.h"
 #include "osdep.h"
 #include "qemu-common.h"
 #include "block_int.h"
@@ -43,7 +43,7 @@
     int ev_signo;
     off_t aio_offset;
 
-    TAILQ_ENTRY(qemu_paiocb) node;
+    QTAILQ_ENTRY(qemu_paiocb) node;
     int aio_type;
     ssize_t ret;
     int active;
@@ -63,7 +63,7 @@
 static int max_threads = 64;
 static int cur_threads = 0;
 static int idle_threads = 0;
-static TAILQ_HEAD(, qemu_paiocb) request_list;
+static QTAILQ_HEAD(, qemu_paiocb) request_list;
 
 #ifdef CONFIG_PREADV
 static int preadv_present = 1;
@@ -321,16 +321,16 @@
 
         mutex_lock(&lock);
 
-        while (TAILQ_EMPTY(&request_list) &&
+        while (QTAILQ_EMPTY(&request_list) &&
                !(ret == ETIMEDOUT)) {
             ret = cond_timedwait(&cond, &lock, &ts);
         }
 
-        if (TAILQ_EMPTY(&request_list))
+        if (QTAILQ_EMPTY(&request_list))
             break;
 
-        aiocb = TAILQ_FIRST(&request_list);
-        TAILQ_REMOVE(&request_list, aiocb, node);
+        aiocb = QTAILQ_FIRST(&request_list);
+        QTAILQ_REMOVE(&request_list, aiocb, node);
         aiocb->active = 1;
         idle_threads--;
         mutex_unlock(&lock);
@@ -381,7 +381,7 @@
     mutex_lock(&lock);
     if (idle_threads == 0 && cur_threads < max_threads)
         spawn_thread();
-    TAILQ_INSERT_TAIL(&request_list, aiocb, node);
+    QTAILQ_INSERT_TAIL(&request_list, aiocb, node);
     mutex_unlock(&lock);
     cond_signal(&cond);
 }
@@ -509,7 +509,7 @@
 
     mutex_lock(&lock);
     if (!acb->active) {
-        TAILQ_REMOVE(&request_list, acb, node);
+        QTAILQ_REMOVE(&request_list, acb, node);
         acb->ret = -ECANCELED;
     } else if (acb->ret == -EINPROGRESS) {
         active = 1;
@@ -619,7 +619,7 @@
     if (ret)
         die2(ret, "pthread_attr_setdetachstate");
 
-    TAILQ_INIT(&request_list);
+    QTAILQ_INIT(&request_list);
 
     posix_aio_state = s;
 
diff --git a/qdict.c b/qdict.c
index ecc266e..a302f4c 100644
--- a/qdict.c
+++ b/qdict.c
@@ -14,7 +14,7 @@
 #include "qdict.h"
 #include "qstring.h"
 #include "qobject.h"
-#include "sys-queue.h"
+#include "qemu-queue.h"
 #include "qemu-common.h"
 
 static void qdict_destroy_obj(QObject *obj);
@@ -88,7 +88,7 @@
 {
     QDictEntry *entry;
 
-    LIST_FOREACH(entry, &qdict->table[hash], next)
+    QLIST_FOREACH(entry, &qdict->table[hash], next)
         if (!strcmp(entry->key, key))
             return entry;
 
@@ -120,7 +120,7 @@
     } else {
         /* allocate a new entry */
         entry = alloc_entry(key, value);
-        LIST_INSERT_HEAD(&qdict->table[hash], entry, next);
+        QLIST_INSERT_HEAD(&qdict->table[hash], entry, next);
     }
 
     qdict->size++;
@@ -266,7 +266,7 @@
 
     entry = qdict_find(qdict, key, tdb_hash(key) % QDICT_HASH_SIZE);
     if (entry) {
-        LIST_REMOVE(entry, next);
+        QLIST_REMOVE(entry, next);
         qentry_destroy(entry);
         qdict->size--;
     }
@@ -284,10 +284,10 @@
     qdict = qobject_to_qdict(obj);
 
     for (i = 0; i < QDICT_HASH_SIZE; i++) {
-        QDictEntry *entry = LIST_FIRST(&qdict->table[i]);
+        QDictEntry *entry = QLIST_FIRST(&qdict->table[i]);
         while (entry) {
-            QDictEntry *tmp = LIST_NEXT(entry, next);
-            LIST_REMOVE(entry, next);
+            QDictEntry *tmp = QLIST_NEXT(entry, next);
+            QLIST_REMOVE(entry, next);
             qentry_destroy(entry);
             entry = tmp;
         }
diff --git a/qdict.h b/qdict.h
index 613d163..3102ca2 100644
--- a/qdict.h
+++ b/qdict.h
@@ -2,7 +2,7 @@
 #define QDICT_H
 
 #include "qobject.h"
-#include "sys-queue.h"
+#include "qemu-queue.h"
 #include <stdint.h>
 
 #define QDICT_HASH_SIZE 512
@@ -10,13 +10,13 @@
 typedef struct QDictEntry {
     char *key;
     QObject *value;
-    LIST_ENTRY(QDictEntry) next;
+    QLIST_ENTRY(QDictEntry) next;
 } QDictEntry;
 
 typedef struct QDict {
     QObject_HEAD;
     size_t size;
-    LIST_HEAD(,QDictEntry) table[QDICT_HASH_SIZE];
+    QLIST_HEAD(,QDictEntry) table[QDICT_HASH_SIZE];
 } QDict;
 
 /* Object API */
diff --git a/qemu-char.c b/qemu-char.c
index 4f29618..8084a67 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -106,8 +106,8 @@
 /***********************************************************/
 /* character device */
 
-static TAILQ_HEAD(CharDriverStateHead, CharDriverState) chardevs =
-    TAILQ_HEAD_INITIALIZER(chardevs);
+static QTAILQ_HEAD(CharDriverStateHead, CharDriverState) chardevs =
+    QTAILQ_HEAD_INITIALIZER(chardevs);
 static int initial_reset_issued;
 
 static void qemu_chr_event(CharDriverState *s, int event)
@@ -139,7 +139,7 @@
 
     initial_reset_issued = 1;
 
-    TAILQ_FOREACH(chr, &chardevs, next) {
+    QTAILQ_FOREACH(chr, &chardevs, next) {
         qemu_chr_reset(chr);
     }
 }
@@ -352,7 +352,7 @@
         case 's':
             {
                 DriveInfo *dinfo;
-                TAILQ_FOREACH(dinfo, &drives, next) {
+                QTAILQ_FOREACH(dinfo, &drives, next) {
                     bdrv_commit(dinfo->bdrv);
                 }
             }
@@ -2400,7 +2400,7 @@
     if (!chr->filename)
         chr->filename = qemu_strdup(qemu_opt_get(opts, "backend"));
     chr->init = init;
-    TAILQ_INSERT_TAIL(&chardevs, chr, next);
+    QTAILQ_INSERT_TAIL(&chardevs, chr, next);
 
     if (qemu_opt_get_bool(opts, "mux", 0)) {
         CharDriverState *base = chr;
@@ -2409,7 +2409,7 @@
         snprintf(base->label, len, "%s-base", qemu_opts_id(opts));
         chr = qemu_chr_open_mux(base);
         chr->filename = base->filename;
-        TAILQ_INSERT_TAIL(&chardevs, chr, next);
+        QTAILQ_INSERT_TAIL(&chardevs, chr, next);
     }
     chr->label = qemu_strdup(qemu_opts_id(opts));
     return chr;
@@ -2438,7 +2438,7 @@
 
 void qemu_chr_close(CharDriverState *chr)
 {
-    TAILQ_REMOVE(&chardevs, chr, next);
+    QTAILQ_REMOVE(&chardevs, chr, next);
     if (chr->chr_close)
         chr->chr_close(chr);
     qemu_free(chr->filename);
@@ -2450,7 +2450,7 @@
 {
     CharDriverState *chr;
 
-    TAILQ_FOREACH(chr, &chardevs, next) {
+    QTAILQ_FOREACH(chr, &chardevs, next) {
         monitor_printf(mon, "%s: filename=%s\n", chr->label, chr->filename);
     }
 }
@@ -2459,7 +2459,7 @@
 {
     CharDriverState *chr;
 
-    TAILQ_FOREACH(chr, &chardevs, next) {
+    QTAILQ_FOREACH(chr, &chardevs, next) {
         if (strcmp(chr->label, name) != 0)
             continue;
         return chr;
diff --git a/qemu-char.h b/qemu-char.h
index d12ab11..c0654bc 100644
--- a/qemu-char.h
+++ b/qemu-char.h
@@ -2,7 +2,7 @@
 #define QEMU_CHAR_H
 
 #include "qemu-common.h"
-#include "sys-queue.h"
+#include "qemu-queue.h"
 #include "qemu-option.h"
 #include "qemu-config.h"
 
@@ -66,7 +66,7 @@
     QEMUBH *bh;
     char *label;
     char *filename;
-    TAILQ_ENTRY(CharDriverState) next;
+    QTAILQ_ENTRY(CharDriverState) next;
 };
 
 CharDriverState *qemu_chr_open_opts(QemuOpts *opts,
diff --git a/qemu-config.c b/qemu-config.c
index f6f4cb4..39bf6a9 100644
--- a/qemu-config.c
+++ b/qemu-config.c
@@ -4,7 +4,7 @@
 
 QemuOptsList qemu_drive_opts = {
     .name = "drive",
-    .head = TAILQ_HEAD_INITIALIZER(qemu_drive_opts.head),
+    .head = QTAILQ_HEAD_INITIALIZER(qemu_drive_opts.head),
     .desc = {
         {
             .name = "bus",
@@ -77,7 +77,7 @@
 
 QemuOptsList qemu_chardev_opts = {
     .name = "chardev",
-    .head = TAILQ_HEAD_INITIALIZER(qemu_chardev_opts.head),
+    .head = QTAILQ_HEAD_INITIALIZER(qemu_chardev_opts.head),
     .desc = {
         {
             .name = "backend",
@@ -140,7 +140,7 @@
 
 QemuOptsList qemu_device_opts = {
     .name = "device",
-    .head = TAILQ_HEAD_INITIALIZER(qemu_device_opts.head),
+    .head = QTAILQ_HEAD_INITIALIZER(qemu_device_opts.head),
     .desc = {
         /*
          * no elements => accept any
diff --git a/qemu-option.c b/qemu-option.c
index 0c2101e..88298e4 100644
--- a/qemu-option.c
+++ b/qemu-option.c
@@ -477,21 +477,21 @@
     } value;
 
     QemuOpts     *opts;
-    TAILQ_ENTRY(QemuOpt) next;
+    QTAILQ_ENTRY(QemuOpt) next;
 };
 
 struct QemuOpts {
     const char *id;
     QemuOptsList *list;
-    TAILQ_HEAD(, QemuOpt) head;
-    TAILQ_ENTRY(QemuOpts) next;
+    QTAILQ_HEAD(, QemuOpt) head;
+    QTAILQ_ENTRY(QemuOpts) next;
 };
 
 static QemuOpt *qemu_opt_find(QemuOpts *opts, const char *name)
 {
     QemuOpt *opt;
 
-    TAILQ_FOREACH(opt, &opts->head, next) {
+    QTAILQ_FOREACH(opt, &opts->head, next) {
         if (strcmp(opt->name, name) != 0)
             continue;
         return opt;
@@ -556,7 +556,7 @@
 
 static void qemu_opt_del(QemuOpt *opt)
 {
-    TAILQ_REMOVE(&opt->opts->head, opt, next);
+    QTAILQ_REMOVE(&opt->opts->head, opt, next);
     qemu_free((/* !const */ char*)opt->name);
     qemu_free((/* !const */ char*)opt->str);
     qemu_free(opt);
@@ -588,7 +588,7 @@
         opt = qemu_mallocz(sizeof(*opt));
         opt->name = qemu_strdup(name);
         opt->opts = opts;
-        TAILQ_INSERT_TAIL(&opts->head, opt, next);
+        QTAILQ_INSERT_TAIL(&opts->head, opt, next);
         if (desc[i].name != NULL) {
             opt->desc = desc+i;
         }
@@ -613,7 +613,7 @@
     QemuOpt *opt;
     int rc = 0;
 
-    TAILQ_FOREACH(opt, &opts->head, next) {
+    QTAILQ_FOREACH(opt, &opts->head, next) {
         rc = func(opt->name, opt->str, opaque);
         if (abort_on_failure  &&  rc != 0)
             break;
@@ -625,7 +625,7 @@
 {
     QemuOpts *opts;
 
-    TAILQ_FOREACH(opts, &list->head, next) {
+    QTAILQ_FOREACH(opts, &list->head, next) {
         if (!opts->id) {
             continue;
         }
@@ -658,8 +658,8 @@
         opts->id = qemu_strdup(id);
     }
     opts->list = list;
-    TAILQ_INIT(&opts->head);
-    TAILQ_INSERT_TAIL(&list->head, opts, next);
+    QTAILQ_INIT(&opts->head);
+    QTAILQ_INSERT_TAIL(&list->head, opts, next);
     return opts;
 }
 
@@ -687,12 +687,12 @@
     QemuOpt *opt;
 
     for (;;) {
-        opt = TAILQ_FIRST(&opts->head);
+        opt = QTAILQ_FIRST(&opts->head);
         if (opt == NULL)
             break;
         qemu_opt_del(opt);
     }
-    TAILQ_REMOVE(&opts->list->head, opts, next);
+    QTAILQ_REMOVE(&opts->list->head, opts, next);
     qemu_free(opts);
 }
 
@@ -702,7 +702,7 @@
 
     fprintf(stderr, "%s: %s:", opts->list->name,
             opts->id ? opts->id : "<noid>");
-    TAILQ_FOREACH(opt, &opts->head, next) {
+    QTAILQ_FOREACH(opt, &opts->head, next) {
         fprintf(stderr, " %s=\"%s\"", opt->name, opt->str);
     }
     fprintf(stderr, "\n");
@@ -788,7 +788,7 @@
     QemuOpts *opts;
     int rc = 0;
 
-    TAILQ_FOREACH(opts, &list->head, next) {
+    QTAILQ_FOREACH(opts, &list->head, next) {
         rc = func(opts, opaque);
         if (abort_on_failure  &&  rc != 0)
             break;
diff --git a/qemu-option.h b/qemu-option.h
index 9e52625..6b968a5 100644
--- a/qemu-option.h
+++ b/qemu-option.h
@@ -26,7 +26,7 @@
 #ifndef QEMU_OPTIONS_H
 #define QEMU_OPTIONS_H
 
-#include "sys-queue.h"
+#include "qemu-queue.h"
 
 enum QEMUOptionParType {
     OPT_FLAG,
@@ -95,7 +95,7 @@
 
 struct QemuOptsList {
     const char *name;
-    TAILQ_HEAD(, QemuOpts) head;
+    QTAILQ_HEAD(, QemuOpts) head;
     QemuOptDesc desc[];
 };
 
diff --git a/sys-queue.h b/qemu-queue.h
similarity index 81%
rename from sys-queue.h
rename to qemu-queue.h
index eb89a4d..8877efd 100644
--- a/sys-queue.h
+++ b/qemu-queue.h
@@ -36,8 +36,8 @@
  *      @(#)queue.h     8.5 (Berkeley) 8/20/94
  */
 
-#ifndef _SYS_QUEUE_H_
-#define _SYS_QUEUE_H_
+#ifndef QEMU_SYS_QUEUE_H_
+#define QEMU_SYS_QUEUE_H_
 
 /*
  * This file defines three types of data structures:
@@ -71,15 +71,15 @@
 /*
  * List definitions.
  */
-#define LIST_HEAD(name, type)                                           \
+#define QLIST_HEAD(name, type)                                          \
 struct name {                                                           \
         struct type *lh_first;  /* first element */                     \
 }
 
-#define LIST_HEAD_INITIALIZER(head)                                     \
+#define QLIST_HEAD_INITIALIZER(head)                                    \
         { NULL }
 
-#define LIST_ENTRY(type)                                                \
+#define QLIST_ENTRY(type)                                               \
 struct {                                                                \
         struct type *le_next;   /* next element */                      \
         struct type **le_prev;  /* address of previous next element */  \
@@ -88,11 +88,11 @@
 /*
  * List functions.
  */
-#define LIST_INIT(head) do {                                            \
+#define QLIST_INIT(head) do {                                           \
         (head)->lh_first = NULL;                                        \
 } while (/*CONSTCOND*/0)
 
-#define LIST_INSERT_AFTER(listelm, elm, field) do {                     \
+#define QLIST_INSERT_AFTER(listelm, elm, field) do {                    \
         if (((elm)->field.le_next = (listelm)->field.le_next) != NULL)  \
                 (listelm)->field.le_next->field.le_prev =               \
                     &(elm)->field.le_next;                              \
@@ -100,33 +100,33 @@
         (elm)->field.le_prev = &(listelm)->field.le_next;               \
 } while (/*CONSTCOND*/0)
 
-#define LIST_INSERT_BEFORE(listelm, elm, field) do {                    \
+#define QLIST_INSERT_BEFORE(listelm, elm, field) do {                   \
         (elm)->field.le_prev = (listelm)->field.le_prev;                \
         (elm)->field.le_next = (listelm);                               \
         *(listelm)->field.le_prev = (elm);                              \
         (listelm)->field.le_prev = &(elm)->field.le_next;               \
 } while (/*CONSTCOND*/0)
 
-#define LIST_INSERT_HEAD(head, elm, field) do {                         \
+#define QLIST_INSERT_HEAD(head, elm, field) do {                        \
         if (((elm)->field.le_next = (head)->lh_first) != NULL)          \
                 (head)->lh_first->field.le_prev = &(elm)->field.le_next;\
         (head)->lh_first = (elm);                                       \
         (elm)->field.le_prev = &(head)->lh_first;                       \
 } while (/*CONSTCOND*/0)
 
-#define LIST_REMOVE(elm, field) do {                                    \
+#define QLIST_REMOVE(elm, field) do {                                   \
         if ((elm)->field.le_next != NULL)                               \
                 (elm)->field.le_next->field.le_prev =                   \
                     (elm)->field.le_prev;                               \
         *(elm)->field.le_prev = (elm)->field.le_next;                   \
 } while (/*CONSTCOND*/0)
 
-#define LIST_FOREACH(var, head, field)                                  \
+#define QLIST_FOREACH(var, head, field)                                 \
         for ((var) = ((head)->lh_first);                                \
                 (var);                                                  \
                 (var) = ((var)->field.le_next))
 
-#define LIST_FOREACH_SAFE(var, head, field, next_var)                   \
+#define QLIST_FOREACH_SAFE(var, head, field, next_var)                  \
         for ((var) = ((head)->lh_first);                                \
                 (var) && ((next_var) = ((var)->field.le_next), 1);      \
                 (var) = (next_var))
@@ -134,40 +134,40 @@
 /*
  * List access methods.
  */
-#define LIST_EMPTY(head)                ((head)->lh_first == NULL)
-#define LIST_FIRST(head)                ((head)->lh_first)
-#define LIST_NEXT(elm, field)           ((elm)->field.le_next)
+#define QLIST_EMPTY(head)                ((head)->lh_first == NULL)
+#define QLIST_FIRST(head)                ((head)->lh_first)
+#define QLIST_NEXT(elm, field)           ((elm)->field.le_next)
 
 
 /*
  * Tail queue definitions.
  */
-#define _TAILQ_HEAD(name, type, qual)                                   \
+#define Q_TAILQ_HEAD(name, type, qual)                                  \
 struct name {                                                           \
         qual type *tqh_first;           /* first element */             \
         qual type *qual *tqh_last;      /* addr of last next element */ \
 }
-#define TAILQ_HEAD(name, type)  _TAILQ_HEAD(name, struct type,)
+#define QTAILQ_HEAD(name, type)  Q_TAILQ_HEAD(name, struct type,)
 
-#define TAILQ_HEAD_INITIALIZER(head)                                    \
+#define QTAILQ_HEAD_INITIALIZER(head)                                   \
         { NULL, &(head).tqh_first }
 
-#define _TAILQ_ENTRY(type, qual)                                        \
+#define Q_TAILQ_ENTRY(type, qual)                                       \
 struct {                                                                \
         qual type *tqe_next;            /* next element */              \
         qual type *qual *tqe_prev;      /* address of previous next element */\
 }
-#define TAILQ_ENTRY(type)       _TAILQ_ENTRY(struct type,)
+#define QTAILQ_ENTRY(type)       Q_TAILQ_ENTRY(struct type,)
 
 /*
  * Tail queue functions.
  */
-#define TAILQ_INIT(head) do {                                           \
+#define QTAILQ_INIT(head) do {                                          \
         (head)->tqh_first = NULL;                                       \
         (head)->tqh_last = &(head)->tqh_first;                          \
 } while (/*CONSTCOND*/0)
 
-#define TAILQ_INSERT_HEAD(head, elm, field) do {                        \
+#define QTAILQ_INSERT_HEAD(head, elm, field) do {                       \
         if (((elm)->field.tqe_next = (head)->tqh_first) != NULL)        \
                 (head)->tqh_first->field.tqe_prev =                     \
                     &(elm)->field.tqe_next;                             \
@@ -177,14 +177,14 @@
         (elm)->field.tqe_prev = &(head)->tqh_first;                     \
 } while (/*CONSTCOND*/0)
 
-#define TAILQ_INSERT_TAIL(head, elm, field) do {                        \
+#define QTAILQ_INSERT_TAIL(head, elm, field) do {                       \
         (elm)->field.tqe_next = NULL;                                   \
         (elm)->field.tqe_prev = (head)->tqh_last;                       \
         *(head)->tqh_last = (elm);                                      \
         (head)->tqh_last = &(elm)->field.tqe_next;                      \
 } while (/*CONSTCOND*/0)
 
-#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do {              \
+#define QTAILQ_INSERT_AFTER(head, listelm, elm, field) do {             \
         if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
                 (elm)->field.tqe_next->field.tqe_prev =                 \
                     &(elm)->field.tqe_next;                             \
@@ -194,14 +194,14 @@
         (elm)->field.tqe_prev = &(listelm)->field.tqe_next;             \
 } while (/*CONSTCOND*/0)
 
-#define TAILQ_INSERT_BEFORE(listelm, elm, field) do {                   \
+#define QTAILQ_INSERT_BEFORE(listelm, elm, field) do {                  \
         (elm)->field.tqe_prev = (listelm)->field.tqe_prev;              \
         (elm)->field.tqe_next = (listelm);                              \
         *(listelm)->field.tqe_prev = (elm);                             \
         (listelm)->field.tqe_prev = &(elm)->field.tqe_next;             \
 } while (/*CONSTCOND*/0)
 
-#define TAILQ_REMOVE(head, elm, field) do {                             \
+#define QTAILQ_REMOVE(head, elm, field) do {                            \
         if (((elm)->field.tqe_next) != NULL)                            \
                 (elm)->field.tqe_next->field.tqe_prev =                 \
                     (elm)->field.tqe_prev;                              \
@@ -210,17 +210,17 @@
         *(elm)->field.tqe_prev = (elm)->field.tqe_next;                 \
 } while (/*CONSTCOND*/0)
 
-#define TAILQ_FOREACH(var, head, field)                                 \
+#define QTAILQ_FOREACH(var, head, field)                                \
         for ((var) = ((head)->tqh_first);                               \
                 (var);                                                  \
                 (var) = ((var)->field.tqe_next))
 
-#define TAILQ_FOREACH_SAFE(var, head, field, next_var)                  \
+#define QTAILQ_FOREACH_SAFE(var, head, field, next_var)                 \
         for ((var) = ((head)->tqh_first);                               \
                 (var) && ((next_var) = ((var)->field.tqe_next), 1);     \
                 (var) = (next_var))
 
-#define TAILQ_FOREACH_REVERSE(var, head, headname, field)               \
+#define QTAILQ_FOREACH_REVERSE(var, head, headname, field)              \
         for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last));    \
                 (var);                                                  \
                 (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last)))
@@ -228,29 +228,29 @@
 /*
  * Tail queue access methods.
  */
-#define TAILQ_EMPTY(head)               ((head)->tqh_first == NULL)
-#define TAILQ_FIRST(head)               ((head)->tqh_first)
-#define TAILQ_NEXT(elm, field)          ((elm)->field.tqe_next)
+#define QTAILQ_EMPTY(head)               ((head)->tqh_first == NULL)
+#define QTAILQ_FIRST(head)               ((head)->tqh_first)
+#define QTAILQ_NEXT(elm, field)          ((elm)->field.tqe_next)
 
-#define TAILQ_LAST(head, headname) \
+#define QTAILQ_LAST(head, headname) \
         (*(((struct headname *)((head)->tqh_last))->tqh_last))
-#define TAILQ_PREV(elm, headname, field) \
+#define QTAILQ_PREV(elm, headname, field) \
         (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
 
 
 /*
  * Circular queue definitions.
  */
-#define CIRCLEQ_HEAD(name, type)                                        \
+#define QCIRCLEQ_HEAD(name, type)                                       \
 struct name {                                                           \
         struct type *cqh_first;         /* first element */             \
         struct type *cqh_last;          /* last element */              \
 }
 
-#define CIRCLEQ_HEAD_INITIALIZER(head)                                  \
+#define QCIRCLEQ_HEAD_INITIALIZER(head)                                 \
         { (void *)&head, (void *)&head }
 
-#define CIRCLEQ_ENTRY(type)                                             \
+#define QCIRCLEQ_ENTRY(type)                                            \
 struct {                                                                \
         struct type *cqe_next;          /* next element */              \
         struct type *cqe_prev;          /* previous element */          \
@@ -259,12 +259,12 @@
 /*
  * Circular queue functions.
  */
-#define CIRCLEQ_INIT(head) do {                                         \
+#define QCIRCLEQ_INIT(head) do {                                        \
         (head)->cqh_first = (void *)(head);                             \
         (head)->cqh_last = (void *)(head);                              \
 } while (/*CONSTCOND*/0)
 
-#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do {            \
+#define QCIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do {           \
         (elm)->field.cqe_next = (listelm)->field.cqe_next;              \
         (elm)->field.cqe_prev = (listelm);                              \
         if ((listelm)->field.cqe_next == (void *)(head))                \
@@ -274,7 +274,7 @@
         (listelm)->field.cqe_next = (elm);                              \
 } while (/*CONSTCOND*/0)
 
-#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do {           \
+#define QCIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do {          \
         (elm)->field.cqe_next = (listelm);                              \
         (elm)->field.cqe_prev = (listelm)->field.cqe_prev;              \
         if ((listelm)->field.cqe_prev == (void *)(head))                \
@@ -284,7 +284,7 @@
         (listelm)->field.cqe_prev = (elm);                              \
 } while (/*CONSTCOND*/0)
 
-#define CIRCLEQ_INSERT_HEAD(head, elm, field) do {                      \
+#define QCIRCLEQ_INSERT_HEAD(head, elm, field) do {                     \
         (elm)->field.cqe_next = (head)->cqh_first;                      \
         (elm)->field.cqe_prev = (void *)(head);                         \
         if ((head)->cqh_last == (void *)(head))                         \
@@ -294,7 +294,7 @@
         (head)->cqh_first = (elm);                                      \
 } while (/*CONSTCOND*/0)
 
-#define CIRCLEQ_INSERT_TAIL(head, elm, field) do {                      \
+#define QCIRCLEQ_INSERT_TAIL(head, elm, field) do {                     \
         (elm)->field.cqe_next = (void *)(head);                         \
         (elm)->field.cqe_prev = (head)->cqh_last;                       \
         if ((head)->cqh_first == (void *)(head))                        \
@@ -304,7 +304,7 @@
         (head)->cqh_last = (elm);                                       \
 } while (/*CONSTCOND*/0)
 
-#define CIRCLEQ_REMOVE(head, elm, field) do {                           \
+#define QCIRCLEQ_REMOVE(head, elm, field) do {                          \
         if ((elm)->field.cqe_next == (void *)(head))                    \
                 (head)->cqh_last = (elm)->field.cqe_prev;               \
         else                                                            \
@@ -317,12 +317,12 @@
                     (elm)->field.cqe_next;                              \
 } while (/*CONSTCOND*/0)
 
-#define CIRCLEQ_FOREACH(var, head, field)                               \
+#define QCIRCLEQ_FOREACH(var, head, field)                              \
         for ((var) = ((head)->cqh_first);                               \
                 (var) != (const void *)(head);                          \
                 (var) = ((var)->field.cqe_next))
 
-#define CIRCLEQ_FOREACH_REVERSE(var, head, field)                       \
+#define QCIRCLEQ_FOREACH_REVERSE(var, head, field)                      \
         for ((var) = ((head)->cqh_last);                                \
                 (var) != (const void *)(head);                          \
                 (var) = ((var)->field.cqe_prev))
@@ -330,19 +330,19 @@
 /*
  * Circular queue access methods.
  */
-#define CIRCLEQ_EMPTY(head)             ((head)->cqh_first == (void *)(head))
-#define CIRCLEQ_FIRST(head)             ((head)->cqh_first)
-#define CIRCLEQ_LAST(head)              ((head)->cqh_last)
-#define CIRCLEQ_NEXT(elm, field)        ((elm)->field.cqe_next)
-#define CIRCLEQ_PREV(elm, field)        ((elm)->field.cqe_prev)
+#define QCIRCLEQ_EMPTY(head)             ((head)->cqh_first == (void *)(head))
+#define QCIRCLEQ_FIRST(head)             ((head)->cqh_first)
+#define QCIRCLEQ_LAST(head)              ((head)->cqh_last)
+#define QCIRCLEQ_NEXT(elm, field)        ((elm)->field.cqe_next)
+#define QCIRCLEQ_PREV(elm, field)        ((elm)->field.cqe_prev)
 
-#define CIRCLEQ_LOOP_NEXT(head, elm, field)                             \
+#define QCIRCLEQ_LOOP_NEXT(head, elm, field)                            \
         (((elm)->field.cqe_next == (void *)(head))                      \
             ? ((head)->cqh_first)                                       \
             : (elm->field.cqe_next))
-#define CIRCLEQ_LOOP_PREV(head, elm, field)                             \
+#define QCIRCLEQ_LOOP_PREV(head, elm, field)                            \
         (((elm)->field.cqe_prev == (void *)(head))                      \
             ? ((head)->cqh_last)                                        \
             : (elm->field.cqe_prev))
 
-#endif  /* !_SYS_QUEUE_H_ */
+#endif  /* !QEMU_SYS_QUEUE_H_ */
diff --git a/qemu-sockets.c b/qemu-sockets.c
index b80279c..3cdff4c 100644
--- a/qemu-sockets.c
+++ b/qemu-sockets.c
@@ -32,7 +32,7 @@
 /* used temporarely until all users are converted to QemuOpts */
 QemuOptsList dummy_opts = {
     .name = "dummy",
-    .head = TAILQ_HEAD_INITIALIZER(dummy_opts.head),
+    .head = QTAILQ_HEAD_INITIALIZER(dummy_opts.head),
     .desc = {
         {
             .name = "path",
diff --git a/savevm.c b/savevm.c
index dd82bd8..fd767be 100644
--- a/savevm.c
+++ b/savevm.c
@@ -31,8 +31,6 @@
 
 /* Needed early for CONFIG_BSD etc. */
 #include "config-host.h"
-/* Needed early to override system queue definitions on BSD */
-#include "sys-queue.h"
 
 #ifndef _WIN32
 #include <sys/times.h>
@@ -92,6 +90,7 @@
 #include "audio/audio.h"
 #include "migration.h"
 #include "qemu_socket.h"
+#include "qemu-queue.h"
 
 /* point to the block driver where the snapshots are managed */
 static BlockDriverState *bs_snapshots;
@@ -912,7 +911,7 @@
 };
 
 typedef struct SaveStateEntry {
-    TAILQ_ENTRY(SaveStateEntry) entry;
+    QTAILQ_ENTRY(SaveStateEntry) entry;
     char idstr[256];
     int instance_id;
     int version_id;
@@ -924,8 +923,8 @@
     void *opaque;
 } SaveStateEntry;
 
-static TAILQ_HEAD(savevm_handlers, SaveStateEntry) savevm_handlers =
-    TAILQ_HEAD_INITIALIZER(savevm_handlers);
+static QTAILQ_HEAD(savevm_handlers, SaveStateEntry) savevm_handlers =
+    QTAILQ_HEAD_INITIALIZER(savevm_handlers);
 static int global_section_id;
 
 static int calculate_new_instance_id(const char *idstr)
@@ -933,7 +932,7 @@
     SaveStateEntry *se;
     int instance_id = 0;
 
-    TAILQ_FOREACH(se, &savevm_handlers, entry) {
+    QTAILQ_FOREACH(se, &savevm_handlers, entry) {
         if (strcmp(idstr, se->idstr) == 0
             && instance_id <= se->instance_id) {
             instance_id = se->instance_id + 1;
@@ -972,7 +971,7 @@
         se->instance_id = instance_id;
     }
     /* add at the end of list */
-    TAILQ_INSERT_TAIL(&savevm_handlers, se, entry);
+    QTAILQ_INSERT_TAIL(&savevm_handlers, se, entry);
     return 0;
 }
 
@@ -991,9 +990,9 @@
 {
     SaveStateEntry *se, *new_se;
 
-    TAILQ_FOREACH_SAFE(se, &savevm_handlers, entry, new_se) {
+    QTAILQ_FOREACH_SAFE(se, &savevm_handlers, entry, new_se) {
         if (strcmp(se->idstr, idstr) == 0 && se->opaque == opaque) {
-            TAILQ_REMOVE(&savevm_handlers, se, entry);
+            QTAILQ_REMOVE(&savevm_handlers, se, entry);
             qemu_free(se);
         }
     }
@@ -1020,7 +1019,7 @@
         se->instance_id = instance_id;
     }
     /* add at the end of list */
-    TAILQ_INSERT_TAIL(&savevm_handlers, se, entry);
+    QTAILQ_INSERT_TAIL(&savevm_handlers, se, entry);
     return 0;
 }
 
@@ -1028,9 +1027,9 @@
 {
     SaveStateEntry *se, *new_se;
 
-    TAILQ_FOREACH_SAFE(se, &savevm_handlers, entry, new_se) {
+    QTAILQ_FOREACH_SAFE(se, &savevm_handlers, entry, new_se) {
         if (se->vmsd == vmsd && se->opaque == opaque) {
-            TAILQ_REMOVE(&savevm_handlers, se, entry);
+            QTAILQ_REMOVE(&savevm_handlers, se, entry);
             qemu_free(se);
         }
     }
@@ -1160,7 +1159,7 @@
     qemu_put_be32(f, QEMU_VM_FILE_MAGIC);
     qemu_put_be32(f, QEMU_VM_FILE_VERSION);
 
-    TAILQ_FOREACH(se, &savevm_handlers, entry) {
+    QTAILQ_FOREACH(se, &savevm_handlers, entry) {
         int len;
 
         if (se->save_live_state == NULL)
@@ -1192,7 +1191,7 @@
     SaveStateEntry *se;
     int ret = 1;
 
-    TAILQ_FOREACH(se, &savevm_handlers, entry) {
+    QTAILQ_FOREACH(se, &savevm_handlers, entry) {
         if (se->save_live_state == NULL)
             continue;
 
@@ -1216,7 +1215,7 @@
 {
     SaveStateEntry *se;
 
-    TAILQ_FOREACH(se, &savevm_handlers, entry) {
+    QTAILQ_FOREACH(se, &savevm_handlers, entry) {
         if (se->save_live_state == NULL)
             continue;
 
@@ -1227,7 +1226,7 @@
         se->save_live_state(f, QEMU_VM_SECTION_END, se->opaque);
     }
 
-    TAILQ_FOREACH(se, &savevm_handlers, entry) {
+    QTAILQ_FOREACH(se, &savevm_handlers, entry) {
         int len;
 
 	if (se->save_state == NULL && se->vmsd == NULL)
@@ -1292,7 +1291,7 @@
 {
     SaveStateEntry *se;
 
-    TAILQ_FOREACH(se, &savevm_handlers, entry) {
+    QTAILQ_FOREACH(se, &savevm_handlers, entry) {
         if (!strcmp(se->idstr, idstr) &&
             instance_id == se->instance_id)
             return se;
@@ -1301,7 +1300,7 @@
 }
 
 typedef struct LoadStateEntry {
-    LIST_ENTRY(LoadStateEntry) entry;
+    QLIST_ENTRY(LoadStateEntry) entry;
     SaveStateEntry *se;
     int section_id;
     int version_id;
@@ -1309,8 +1308,8 @@
 
 int qemu_loadvm_state(QEMUFile *f)
 {
-    LIST_HEAD(, LoadStateEntry) loadvm_handlers =
-        LIST_HEAD_INITIALIZER(loadvm_handlers);
+    QLIST_HEAD(, LoadStateEntry) loadvm_handlers =
+        QLIST_HEAD_INITIALIZER(loadvm_handlers);
     LoadStateEntry *le, *new_le;
     uint8_t section_type;
     unsigned int v;
@@ -1367,7 +1366,7 @@
             le->se = se;
             le->section_id = section_id;
             le->version_id = version_id;
-            LIST_INSERT_HEAD(&loadvm_handlers, le, entry);
+            QLIST_INSERT_HEAD(&loadvm_handlers, le, entry);
 
             ret = vmstate_load(f, le->se, le->version_id);
             if (ret < 0) {
@@ -1380,7 +1379,7 @@
         case QEMU_VM_SECTION_END:
             section_id = qemu_get_be32(f);
 
-            LIST_FOREACH(le, &loadvm_handlers, entry) {
+            QLIST_FOREACH(le, &loadvm_handlers, entry) {
                 if (le->section_id == section_id) {
                     break;
                 }
@@ -1408,8 +1407,8 @@
     ret = 0;
 
 out:
-    LIST_FOREACH_SAFE(le, &loadvm_handlers, entry, new_le) {
-        LIST_REMOVE(le, entry);
+    QLIST_FOREACH_SAFE(le, &loadvm_handlers, entry, new_le) {
+        QLIST_REMOVE(le, entry);
         qemu_free(le);
     }
 
@@ -1442,7 +1441,7 @@
 
     if (bs_snapshots)
         return bs_snapshots;
-    TAILQ_FOREACH(dinfo, &drives, next) {
+    QTAILQ_FOREACH(dinfo, &drives, next) {
         bs = dinfo->bdrv;
         if (bdrv_can_snapshot(bs))
             goto ok;
@@ -1547,7 +1546,7 @@
 
     /* create the snapshots */
 
-    TAILQ_FOREACH(dinfo, &drives, next) {
+    QTAILQ_FOREACH(dinfo, &drives, next) {
         bs1 = dinfo->bdrv;
         if (bdrv_has_snapshot(bs1)) {
             if (must_delete) {
@@ -1590,7 +1589,7 @@
     /* Flush all IO requests so they don't interfere with the new state.  */
     qemu_aio_flush();
 
-    TAILQ_FOREACH(dinfo, &drives, next) {
+    QTAILQ_FOREACH(dinfo, &drives, next) {
         bs1 = dinfo->bdrv;
         if (bdrv_has_snapshot(bs1)) {
             ret = bdrv_snapshot_goto(bs1, name);
@@ -1653,7 +1652,7 @@
         return;
     }
 
-    TAILQ_FOREACH(dinfo, &drives, next) {
+    QTAILQ_FOREACH(dinfo, &drives, next) {
         bs1 = dinfo->bdrv;
         if (bdrv_has_snapshot(bs1)) {
             ret = bdrv_snapshot_delete(bs1, name);
@@ -1684,7 +1683,7 @@
         return;
     }
     monitor_printf(mon, "Snapshot devices:");
-    TAILQ_FOREACH(dinfo, &drives, next) {
+    QTAILQ_FOREACH(dinfo, &drives, next) {
         bs1 = dinfo->bdrv;
         if (bdrv_has_snapshot(bs1)) {
             if (bs == bs1)
diff --git a/slirp/slirp.c b/slirp/slirp.c
index d4a9bac..6731f52 100644
--- a/slirp/slirp.c
+++ b/slirp/slirp.c
@@ -44,8 +44,8 @@
 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 @@
 
     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 @@
     struct socket *so, *so_next;
     int nfds;
 
-    if (TAILQ_EMPTY(&slirp_instances)) {
+    if (QTAILQ_EMPTY(&slirp_instances)) {
         return;
     }
 
@@ -276,7 +276,7 @@
 	 */
 	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 @@
     struct socket *so, *so_next;
     int ret;
 
-    if (TAILQ_EMPTY(&slirp_instances)) {
+    if (QTAILQ_EMPTY(&slirp_instances)) {
         return;
     }
 
@@ -394,7 +394,7 @@
 
     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 020412c..9ef57ea 100644
--- a/slirp/slirp.h
+++ b/slirp/slirp.h
@@ -174,7 +174,7 @@
 
 #include "debug.h"
 
-#include "sys-queue.h"
+#include "qemu-queue.h"
 
 #include "libslirp.h"
 #include "ip.h"
@@ -198,7 +198,7 @@
 #include "tftp.h"
 
 struct Slirp {
-    TAILQ_ENTRY(Slirp) entry;
+    QTAILQ_ENTRY(Slirp) entry;
 
     /* virtual network configuration */
     struct in_addr vnetwork_addr;
diff --git a/sysemu.h b/sysemu.h
index ac16c21..a96b168 100644
--- a/sysemu.h
+++ b/sysemu.h
@@ -4,7 +4,7 @@
 
 #include "qemu-common.h"
 #include "qemu-option.h"
-#include "sys-queue.h"
+#include "qemu-queue.h"
 #include "qdict.h"
 
 #ifdef _WIN32
@@ -174,15 +174,15 @@
     QemuOpts *opts;
     BlockInterfaceErrorAction onerror;
     char serial[BLOCK_SERIAL_STRLEN + 1];
-    TAILQ_ENTRY(DriveInfo) next;
+    QTAILQ_ENTRY(DriveInfo) next;
 } DriveInfo;
 
 #define MAX_IDE_DEVS	2
 #define MAX_SCSI_DEVS	7
 #define MAX_DRIVES 32
 
-extern TAILQ_HEAD(drivelist, DriveInfo) drives;
-extern TAILQ_HEAD(driveoptlist, DriveOpt) driveopts;
+extern QTAILQ_HEAD(drivelist, DriveInfo) drives;
+extern QTAILQ_HEAD(driveoptlist, DriveOpt) driveopts;
 
 extern DriveInfo *drive_get(BlockInterfaceType type, int bus, int unit);
 extern DriveInfo *drive_get_by_id(const char *id);
diff --git a/target-alpha/translate.c b/target-alpha/translate.c
index 1dd8562..9d2bc45 100644
--- a/target-alpha/translate.c
+++ b/target-alpha/translate.c
@@ -2367,8 +2367,8 @@
 
     gen_icount_start();
     for (ret = 0; ret == 0;) {
-        if (unlikely(!TAILQ_EMPTY(&env->breakpoints))) {
-            TAILQ_FOREACH(bp, &env->breakpoints, entry) {
+        if (unlikely(!QTAILQ_EMPTY(&env->breakpoints))) {
+            QTAILQ_FOREACH(bp, &env->breakpoints, entry) {
                 if (bp->pc == ctx.pc) {
                     gen_excp(&ctx, EXCP_DEBUG, 0);
                     break;
diff --git a/target-arm/translate.c b/target-arm/translate.c
index 4db8d0e..c1d0dcf 100644
--- a/target-arm/translate.c
+++ b/target-arm/translate.c
@@ -8770,8 +8770,8 @@
         }
 #endif
 
-        if (unlikely(!TAILQ_EMPTY(&env->breakpoints))) {
-            TAILQ_FOREACH(bp, &env->breakpoints, entry) {
+        if (unlikely(!QTAILQ_EMPTY(&env->breakpoints))) {
+            QTAILQ_FOREACH(bp, &env->breakpoints, entry) {
                 if (bp->pc == dc->pc) {
                     gen_set_condexec(dc);
                     gen_set_pc_im(dc->pc);
diff --git a/target-cris/translate.c b/target-cris/translate.c
index bd3ae3d..c6068f7 100644
--- a/target-cris/translate.c
+++ b/target-cris/translate.c
@@ -3082,8 +3082,8 @@
 {
 	CPUBreakpoint *bp;
 
-	if (unlikely(!TAILQ_EMPTY(&env->breakpoints))) {
-		TAILQ_FOREACH(bp, &env->breakpoints, entry) {
+	if (unlikely(!QTAILQ_EMPTY(&env->breakpoints))) {
+		QTAILQ_FOREACH(bp, &env->breakpoints, entry) {
 			if (bp->pc == dc->pc) {
 				cris_evaluate_flags (dc);
 				tcg_gen_movi_tl(env_pc, dc->pc);
diff --git a/target-i386/helper.c b/target-i386/helper.c
index 8abbed0..45b04ee 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -1522,7 +1522,7 @@
                 cpu_resume_from_signal(env, NULL);
         }
     } else {
-        TAILQ_FOREACH(bp, &env->breakpoints, entry)
+        QTAILQ_FOREACH(bp, &env->breakpoints, entry)
             if (bp->pc == env->eip) {
                 if (bp->flags & BP_CPU) {
                     check_hw_breakpoints(env, 1);
diff --git a/target-i386/translate.c b/target-i386/translate.c
index ff93985..335fc08 100644
--- a/target-i386/translate.c
+++ b/target-i386/translate.c
@@ -7687,8 +7687,8 @@
 
     gen_icount_start();
     for(;;) {
-        if (unlikely(!TAILQ_EMPTY(&env->breakpoints))) {
-            TAILQ_FOREACH(bp, &env->breakpoints, entry) {
+        if (unlikely(!QTAILQ_EMPTY(&env->breakpoints))) {
+            QTAILQ_FOREACH(bp, &env->breakpoints, entry) {
                 if (bp->pc == pc_ptr &&
                     !((bp->flags & BP_CPU) && (tb->flags & HF_RF_MASK))) {
                     gen_debug(dc, pc_ptr - dc->cs_base);
diff --git a/target-m68k/translate.c b/target-m68k/translate.c
index b37578b..99cf6dd 100644
--- a/target-m68k/translate.c
+++ b/target-m68k/translate.c
@@ -2999,8 +2999,8 @@
     do {
         pc_offset = dc->pc - pc_start;
         gen_throws_exception = NULL;
-        if (unlikely(!TAILQ_EMPTY(&env->breakpoints))) {
-            TAILQ_FOREACH(bp, &env->breakpoints, entry) {
+        if (unlikely(!QTAILQ_EMPTY(&env->breakpoints))) {
+            QTAILQ_FOREACH(bp, &env->breakpoints, entry) {
                 if (bp->pc == dc->pc) {
                     gen_exception(dc, dc->pc, EXCP_DEBUG);
                     dc->is_jmp = DISAS_JUMP;
diff --git a/target-microblaze/translate.c b/target-microblaze/translate.c
index fe53b2e..dfeb8ae 100644
--- a/target-microblaze/translate.c
+++ b/target-microblaze/translate.c
@@ -1230,8 +1230,8 @@
 {
     CPUBreakpoint *bp;
 
-    if (unlikely(!TAILQ_EMPTY(&env->breakpoints))) {
-        TAILQ_FOREACH(bp, &env->breakpoints, entry) {
+    if (unlikely(!QTAILQ_EMPTY(&env->breakpoints))) {
+        QTAILQ_FOREACH(bp, &env->breakpoints, entry) {
             if (bp->pc == dc->pc) {
                 t_gen_raise_exception(dc, EXCP_DEBUG);
                 dc->is_jmp = DISAS_UPDATE;
diff --git a/target-mips/translate.c b/target-mips/translate.c
index a2b2edb..fb3c980 100644
--- a/target-mips/translate.c
+++ b/target-mips/translate.c
@@ -8314,8 +8314,8 @@
     LOG_DISAS("\ntb %p idx %d hflags %04x\n", tb, ctx.mem_idx, ctx.hflags);
     gen_icount_start();
     while (ctx.bstate == BS_NONE) {
-        if (unlikely(!TAILQ_EMPTY(&env->breakpoints))) {
-            TAILQ_FOREACH(bp, &env->breakpoints, entry) {
+        if (unlikely(!QTAILQ_EMPTY(&env->breakpoints))) {
+            QTAILQ_FOREACH(bp, &env->breakpoints, entry) {
                 if (bp->pc == ctx.pc) {
                     save_cpu_state(&ctx, 1);
                     ctx.bstate = BS_BRANCH;
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index 1c54fa7..648bf9e 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -9000,8 +9000,8 @@
     gen_icount_start();
     /* Set env in case of segfault during code fetch */
     while (ctx.exception == POWERPC_EXCP_NONE && gen_opc_ptr < gen_opc_end) {
-        if (unlikely(!TAILQ_EMPTY(&env->breakpoints))) {
-            TAILQ_FOREACH(bp, &env->breakpoints, entry) {
+        if (unlikely(!QTAILQ_EMPTY(&env->breakpoints))) {
+            QTAILQ_FOREACH(bp, &env->breakpoints, entry) {
                 if (bp->pc == ctx.nip) {
                     gen_debug_exception(ctxp);
                     break;
diff --git a/target-sh4/translate.c b/target-sh4/translate.c
index b272f4c..895b978 100644
--- a/target-sh4/translate.c
+++ b/target-sh4/translate.c
@@ -1927,8 +1927,8 @@
         max_insns = CF_COUNT_MASK;
     gen_icount_start();
     while (ctx.bstate == BS_NONE && gen_opc_ptr < gen_opc_end) {
-        if (unlikely(!TAILQ_EMPTY(&env->breakpoints))) {
-            TAILQ_FOREACH(bp, &env->breakpoints, entry) {
+        if (unlikely(!QTAILQ_EMPTY(&env->breakpoints))) {
+            QTAILQ_FOREACH(bp, &env->breakpoints, entry) {
                 if (ctx.pc == bp->pc) {
 		    /* We have hit a breakpoint - make sure PC is up-to-date */
 		    tcg_gen_movi_i32(cpu_pc, ctx.pc);
diff --git a/target-sparc/translate.c b/target-sparc/translate.c
index 61578ec..928aa61 100644
--- a/target-sparc/translate.c
+++ b/target-sparc/translate.c
@@ -4706,8 +4706,8 @@
         max_insns = CF_COUNT_MASK;
     gen_icount_start();
     do {
-        if (unlikely(!TAILQ_EMPTY(&env->breakpoints))) {
-            TAILQ_FOREACH(bp, &env->breakpoints, entry) {
+        if (unlikely(!QTAILQ_EMPTY(&env->breakpoints))) {
+            QTAILQ_FOREACH(bp, &env->breakpoints, entry) {
                 if (bp->pc == dc->pc) {
                     if (dc->pc != pc_start)
                         save_state(dc, cpu_cond);
diff --git a/vl.c b/vl.c
index 1f95a37..0e61333 100644
--- a/vl.c
+++ b/vl.c
@@ -31,8 +31,6 @@
 
 /* Needed early for CONFIG_BSD etc. */
 #include "config-host.h"
-/* Needed early to override system queue definitions on BSD */
-#include "sys-queue.h"
 
 #ifndef _WIN32
 #include <libgen.h>
@@ -168,6 +166,8 @@
 
 #include "slirp/libslirp.h"
 
+#include "qemu-queue.h"
+
 //#define DEBUG_NET
 //#define DEBUG_SLIRP
 
@@ -180,8 +180,8 @@
 const char *bios_name = NULL;
 /* Note: drives_table[MAX_DRIVES] is a dummy block driver if none available
    to store the VM snapshots */
-struct drivelist drives = TAILQ_HEAD_INITIALIZER(drives);
-struct driveoptlist driveopts = TAILQ_HEAD_INITIALIZER(driveopts);
+struct drivelist drives = QTAILQ_HEAD_INITIALIZER(drives);
+struct driveoptlist driveopts = QTAILQ_HEAD_INITIALIZER(driveopts);
 enum vga_retrace_method vga_retrace_method = VGA_RETRACE_DUMB;
 static DisplayState *display_state;
 DisplayType display_type = DT_DEFAULT;
@@ -1810,7 +1810,7 @@
 
     /* seek interface, bus and unit */
 
-    TAILQ_FOREACH(dinfo, &drives, next) {
+    QTAILQ_FOREACH(dinfo, &drives, next) {
         if (dinfo->type == type &&
 	    dinfo->bus == bus &&
 	    dinfo->unit == unit)
@@ -1824,7 +1824,7 @@
 {
     DriveInfo *dinfo;
 
-    TAILQ_FOREACH(dinfo, &drives, next) {
+    QTAILQ_FOREACH(dinfo, &drives, next) {
         if (strcmp(id, dinfo->id))
             continue;
         return dinfo;
@@ -1838,7 +1838,7 @@
     DriveInfo *dinfo;
 
     max_bus = -1;
-    TAILQ_FOREACH(dinfo, &drives, next) {
+    QTAILQ_FOREACH(dinfo, &drives, next) {
         if(dinfo->type == type &&
            dinfo->bus > max_bus)
             max_bus = dinfo->bus;
@@ -1850,7 +1850,7 @@
 {
     DriveInfo *dinfo;
 
-    TAILQ_FOREACH(dinfo, &drives, next) {
+    QTAILQ_FOREACH(dinfo, &drives, next) {
         if (dinfo->bdrv == bdrv)
             return dinfo->serial;
     }
@@ -1862,7 +1862,7 @@
 {
     DriveInfo *dinfo;
 
-    TAILQ_FOREACH(dinfo, &drives, next) {
+    QTAILQ_FOREACH(dinfo, &drives, next) {
         if (dinfo->bdrv == bdrv)
             return dinfo->onerror;
     }
@@ -1879,11 +1879,11 @@
 {
     DriveInfo *dinfo;
 
-    TAILQ_FOREACH(dinfo, &drives, next) {
+    QTAILQ_FOREACH(dinfo, &drives, next) {
         if (dinfo->bdrv != bdrv)
             continue;
         qemu_opts_del(dinfo->opts);
-        TAILQ_REMOVE(&drives, dinfo, next);
+        QTAILQ_REMOVE(&drives, dinfo, next);
         qemu_free(dinfo);
         break;
     }
@@ -2170,7 +2170,7 @@
     dinfo->opts = opts;
     if (serial)
         strncpy(dinfo->serial, serial, sizeof(serial));
-    TAILQ_INSERT_TAIL(&drives, dinfo, next);
+    QTAILQ_INSERT_TAIL(&drives, dinfo, next);
 
     switch(type) {
     case IF_IDE:
@@ -3145,10 +3145,10 @@
 struct vm_change_state_entry {
     VMChangeStateHandler *cb;
     void *opaque;
-    LIST_ENTRY (vm_change_state_entry) entries;
+    QLIST_ENTRY (vm_change_state_entry) entries;
 };
 
-static LIST_HEAD(vm_change_state_head, vm_change_state_entry) vm_change_state_head;
+static QLIST_HEAD(vm_change_state_head, vm_change_state_entry) vm_change_state_head;
 
 VMChangeStateEntry *qemu_add_vm_change_state_handler(VMChangeStateHandler *cb,
                                                      void *opaque)
@@ -3159,13 +3159,13 @@
 
     e->cb = cb;
     e->opaque = opaque;
-    LIST_INSERT_HEAD(&vm_change_state_head, e, entries);
+    QLIST_INSERT_HEAD(&vm_change_state_head, e, entries);
     return e;
 }
 
 void qemu_del_vm_change_state_handler(VMChangeStateEntry *e)
 {
-    LIST_REMOVE (e, entries);
+    QLIST_REMOVE (e, entries);
     qemu_free (e);
 }
 
@@ -3195,13 +3195,13 @@
 /* reset/shutdown handler */
 
 typedef struct QEMUResetEntry {
-    TAILQ_ENTRY(QEMUResetEntry) entry;
+    QTAILQ_ENTRY(QEMUResetEntry) entry;
     QEMUResetHandler *func;
     void *opaque;
 } QEMUResetEntry;
 
-static TAILQ_HEAD(reset_handlers, QEMUResetEntry) reset_handlers =
-    TAILQ_HEAD_INITIALIZER(reset_handlers);
+static QTAILQ_HEAD(reset_handlers, QEMUResetEntry) reset_handlers =
+    QTAILQ_HEAD_INITIALIZER(reset_handlers);
 static int reset_requested;
 static int shutdown_requested;
 static int powerdown_requested;
@@ -3259,16 +3259,16 @@
 
     re->func = func;
     re->opaque = opaque;
-    TAILQ_INSERT_TAIL(&reset_handlers, re, entry);
+    QTAILQ_INSERT_TAIL(&reset_handlers, re, entry);
 }
 
 void qemu_unregister_reset(QEMUResetHandler *func, void *opaque)
 {
     QEMUResetEntry *re;
 
-    TAILQ_FOREACH(re, &reset_handlers, entry) {
+    QTAILQ_FOREACH(re, &reset_handlers, entry) {
         if (re->func == func && re->opaque == opaque) {
-            TAILQ_REMOVE(&reset_handlers, re, entry);
+            QTAILQ_REMOVE(&reset_handlers, re, entry);
             qemu_free(re);
             return;
         }
@@ -3280,7 +3280,7 @@
     QEMUResetEntry *re, *nre;
 
     /* reset all devices */
-    TAILQ_FOREACH_SAFE(re, &reset_handlers, entry, nre) {
+    QTAILQ_FOREACH_SAFE(re, &reset_handlers, entry, nre) {
         re->func(re->opaque);
     }
 }
@@ -4579,9 +4579,9 @@
         DEV_BT,        /* -bt          */
     } type;
     const char *cmdline;
-    TAILQ_ENTRY(device_config) next;
+    QTAILQ_ENTRY(device_config) next;
 };
-TAILQ_HEAD(, device_config) device_configs = TAILQ_HEAD_INITIALIZER(device_configs);
+QTAILQ_HEAD(, device_config) device_configs = QTAILQ_HEAD_INITIALIZER(device_configs);
 
 static void add_device_config(int type, const char *cmdline)
 {
@@ -4590,7 +4590,7 @@
     conf = qemu_mallocz(sizeof(*conf));
     conf->type = type;
     conf->cmdline = cmdline;
-    TAILQ_INSERT_TAIL(&device_configs, conf, next);
+    QTAILQ_INSERT_TAIL(&device_configs, conf, next);
 }
 
 static int foreach_device_config(int type, int (*func)(const char *cmdline))
@@ -4598,7 +4598,7 @@
     struct device_config *conf;
     int rc;
 
-    TAILQ_FOREACH(conf, &device_configs, next) {
+    QTAILQ_FOREACH(conf, &device_configs, next) {
         if (conf->type != type)
             continue;
         rc = func(conf->cmdline);
@@ -4655,7 +4655,7 @@
     qemu_errors_to_file(stderr);
     qemu_cache_utils_init(envp);
 
-    LIST_INIT (&vm_change_state_head);
+    QLIST_INIT (&vm_change_state_head);
 #ifndef _WIN32
     {
         struct sigaction act;
