All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Christopher Covington <cov@codeaurora.org>, qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@gmail.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2] build: include sys/sysmacros.h for major() and minor()
Date: Wed, 28 Dec 2016 10:10:56 -0600	[thread overview]
Message-ID: <2a940dc2-05a0-2e91-afc0-eeb560f6ce32@redhat.com> (raw)
In-Reply-To: <20161228145344.30819-1-cov@codeaurora.org>

[-- Attachment #1: Type: text/plain, Size: 1229 bytes --]

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 <cov@codeaurora.org>
> ---
>  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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2016-12-28 16:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-22 20:56 [Qemu-devel] [PATCH] build: handle deprecation of major() in sys/types.h Radim Krčmář
2016-09-22 21:09 ` Marc-André Lureau
2016-12-28 14:53   ` [Qemu-devel] [PATCH v2] build: include sys/sysmacros.h for major() and minor() Christopher Covington
2016-12-28 16:10     ` Eric Blake [this message]
2016-12-28 17:07       ` Peter Maydell
2016-12-29 13:48         ` Eric Blake
2016-12-30 11:35           ` Peter Maydell
2016-12-28 20:03       ` Christopher Covington
2016-12-28 20:04     ` [Qemu-devel] [PATCH v3] " Christopher Covington
2016-12-29 14:03       ` Eric Blake
2017-03-13 18:31         ` Eric Blake
2017-03-14 10:12       ` Peter Maydell
2016-09-22 21:09 ` [Qemu-devel] [PATCH] build: handle deprecation of major() in sys/types.h Eric Blake
2016-09-22 21:10 ` no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2a940dc2-05a0-2e91-afc0-eeb560f6ce32@redhat.com \
    --to=eblake@redhat.com \
    --cc=cov@codeaurora.org \
    --cc=marcandre.lureau@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rkrcmar@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.