aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2020-03-11 19:23:41 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2020-03-16 23:02:26 +0100
commit67cf3f5cf590549b1b8f8e2eb92ca20ed80d8a0a (patch)
tree6e6cdda27f31f40c6ca171fa29478eb3fd36c794 /configure
parent3df261b6676b5850e93d6fab3f7a98f8ee8f19c5 (diff)
downloadqemu-67cf3f5cf590549b1b8f8e2eb92ca20ed80d8a0a.zip
qemu-67cf3f5cf590549b1b8f8e2eb92ca20ed80d8a0a.tar.gz
qemu-67cf3f5cf590549b1b8f8e2eb92ca20ed80d8a0a.tar.bz2
Use -isystem for linux-headers dir
glibc and Linux-provided headers are known to generate macro redefinition warnings when used together. For example: <linux/mman.h> and <sys/mman.h> duplicate some macro definitions. We normally never see those warnings because GCC suppresses warnings generated by system headers. We carry our own copy of Linux header files, though, and this makes those warnings not be suppressed when glibc headers are included before Linux headers (e.g. if <sys/mman.h> is included before <linux/mman.h>). Use -isystem instead of -I for linux-headers. This makes the compiler treat our linux-headers directory the same way it treats system-provided Linux headers, and suppress warnings generated by them. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure2
1 files changed, 1 insertions, 1 deletions
diff --git a/configure b/configure
index 44a70cf..06fcd07 100755
--- a/configure
+++ b/configure
@@ -900,7 +900,7 @@ Linux)
linux="yes"
linux_user="yes"
kvm="yes"
- QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers -I$PWD/linux-headers $QEMU_INCLUDES"
+ QEMU_INCLUDES="-isystem \$(SRC_PATH)/linux-headers -isystem $PWD/linux-headers $QEMU_INCLUDES"
supported_os="yes"
libudev="yes"
;;