qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] build: include sys/sysmacros.h for major() a


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2] build: include sys/sysmacros.h for major() and minor()
Date: Wed, 28 Dec 2016 10:10:56 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

On 12/28/2016 08:53 AM, Christopher Covington wrote:
> The definition of the major() and minor() macros are moving within glibc to
> <sys/sysmacros.h>. Include this header to avoid the following sorts of
> build-stopping messages:
> 

> The additional include allows the build to complete on Fedora 26 (Rawhide)
> with glibc version 2.24.90.
> 
> Signed-off-by: Christopher Covington <address@hidden>
> ---
>  include/sysemu/os-posix.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/sysemu/os-posix.h b/include/sysemu/os-posix.h
> index b0a6c0695b..772d58f7ed 100644
> --- a/include/sysemu/os-posix.h
> +++ b/include/sysemu/os-posix.h
> @@ -28,6 +28,7 @@
>  
>  #include <sys/mman.h>
>  #include <sys/socket.h>
> +#include <sys/sysmacros.h>

I repeat what I said on v1:

Works for glibc; but <sys/sysmacros.h> is non-standard and not present
on some other systems, so this may fail to build elsewhere.  You'll
probably need a configure probe.  Autoconf also says that some platforms
have <sys/mkdev.h> instead of <sys/sysmacros.h> (per its AC_HEADER_MAJOR
macro).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]