Skip to content
  • Eduardo Habkost's avatar
    67cf3f5c
    Use -isystem for linux-headers dir · 67cf3f5c
    Eduardo Habkost authored
    
    
    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: default avatarEduardo Habkost <ehabkost@redhat.com>
    Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    67cf3f5c
    Use -isystem for linux-headers dir
    Eduardo Habkost authored
    
    
    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: default avatarEduardo Habkost <ehabkost@redhat.com>
    Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Loading