aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2018-06-06 18:15:38 +0100
committerDaniel P. Berrangé <berrange@redhat.com>2018-06-29 12:22:28 +0100
commitc5f1d0c493f29f0137fbd79a2c6653f8546f2044 (patch)
tree45695a9cebd20d3085243ce5760d567b71a392db /include
parent609ef9f451759151d0bfe7c3843410ab94d68f18 (diff)
downloadqemu-c5f1d0c493f29f0137fbd79a2c6653f8546f2044.zip
qemu-c5f1d0c493f29f0137fbd79a2c6653f8546f2044.tar.gz
qemu-c5f1d0c493f29f0137fbd79a2c6653f8546f2044.tar.bz2
util: remove redundant include of glib.h and add osdep.h
Code must only ever include glib.h indirectly via the glib-compat.h header file, because we will need some macros set before glib.h is pulled in. Adding extra includes of glib.h will (soon) cause compile failures such as: In file included from /home/berrange/src/virt/qemu/include/qemu/osdep.h:107, from /home/berrange/src/virt/qemu/include/qemu/iova-tree.h:26, from util/iova-tree.c:13: /home/berrange/src/virt/qemu/include/glib-compat.h:22: error: "GLIB_VERSION_MIN_REQUIRED" redefined [-Werror] #define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_40 In file included from /usr/include/glib-2.0/glib/gtypes.h:34, from /usr/include/glib-2.0/glib/galloca.h:32, from /usr/include/glib-2.0/glib.h:30, from util/iova-tree.c:12: /usr/include/glib-2.0/glib/gversionmacros.h:237: note: this is the location of the previous definition # define GLIB_VERSION_MIN_REQUIRED (GLIB_VERSION_CUR_STABLE) Furthermore, the osdep.h include should always be done directly from the .c file rather than indirectly via any .h file. Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/qemu/iova-tree.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/qemu/iova-tree.h b/include/qemu/iova-tree.h
index b061932..b66cf93 100644
--- a/include/qemu/iova-tree.h
+++ b/include/qemu/iova-tree.h
@@ -23,7 +23,6 @@
* for the thread safety issue.
*/
-#include "qemu/osdep.h"
#include "exec/memory.h"
#include "exec/hwaddr.h"