summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--block/gluster.c3
-rwxr-xr-xconfigure2
-rw-r--r--util/oslib-posix.c1
-rw-r--r--xen-common.c6
-rw-r--r--xen-hvm.c4
5 files changed, 9 insertions, 7 deletions
diff --git a/block/gluster.c b/block/gluster.c
index 0ce15f7adc..891c13b7ce 100644
--- a/block/gluster.c
+++ b/block/gluster.c
@@ -239,12 +239,13 @@ static glfs_t *glfs_find_preopened(const char *volume)
 static void glfs_clear_preopened(glfs_t *fs)
 {
     ListElement *entry = NULL;
+    ListElement *next;
 
     if (fs == NULL) {
         return;
     }
 
-    QLIST_FOREACH(entry, &glfs_list, list) {
+    QLIST_FOREACH_SAFE(entry, &glfs_list, list, next) {
         if (entry->saved.fs == fs) {
             if (--entry->saved.ref) {
                 return;
diff --git a/configure b/configure
index 7d2a34e036..5e66828e64 100755
--- a/configure
+++ b/configure
@@ -582,6 +582,8 @@ FreeBSD)
   audio_possible_drivers="oss sdl pa"
   # needed for kinfo_getvmmap(3) in libutil.h
   LIBS="-lutil $LIBS"
+  # needed for kinfo_getproc
+  libs_qga="-lutil $libs_qga"
   netmap=""  # enable netmap autodetect
   HOST_VARIANT_DIR="freebsd"
 ;;
diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index 67c65893a4..f63146407f 100644
--- a/util/oslib-posix.c
+++ b/util/oslib-posix.c
@@ -45,6 +45,7 @@
 
 #ifdef __FreeBSD__
 #include <sys/sysctl.h>
+#include <sys/user.h>
 #include <libutil.h>
 #endif
 
diff --git a/xen-common.c b/xen-common.c
index bacf962841..909976071c 100644
--- a/xen-common.c
+++ b/xen-common.c
@@ -9,7 +9,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/i386/pc.h"
 #include "hw/xen/xen_backend.h"
 #include "qmp-commands.h"
 #include "sysemu/char.h"
@@ -115,11 +114,6 @@ static void xen_change_state_handler(void *opaque, int running,
 
 static int xen_init(MachineState *ms)
 {
-    PCMachineState *pcms = PC_MACHINE(ms);
-
-    /* Disable ACPI build because Xen handles it */
-    pcms->acpi_build_enabled = false;
-
     xen_xc = xc_interface_open(0, 0, 0);
     if (xen_xc == NULL) {
         xen_pv_printf(NULL, 0, "can't open xen interface\n");
diff --git a/xen-hvm.c b/xen-hvm.c
index 2f348edf86..150c7e7999 100644
--- a/xen-hvm.c
+++ b/xen-hvm.c
@@ -1316,6 +1316,10 @@ void xen_hvm_init(PCMachineState *pcms, MemoryRegion **ram_memory)
     }
     xen_be_register_common();
     xen_read_physmap(state);
+
+    /* Disable ACPI build because Xen handles it */
+    pcms->acpi_build_enabled = false;
+
     return;
 
 err: