All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Christopher Covington <cov@codeaurora.org>
Cc: "QEMU Developers" <qemu-devel@nongnu.org>,
	"Marc-André Lureau" <marcandre.lureau@gmail.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3] build: include sys/sysmacros.h for major() and minor()
Date: Tue, 14 Mar 2017 11:12:51 +0100	[thread overview]
Message-ID: <CAFEAcA_k-iCk_-UguBN1WyfQU+oz70dFKaiXQ4yXonF3Wwamrw@mail.gmail.com> (raw)
In-Reply-To: <20161228200433.24244-1-cov@codeaurora.org>

On 28 December 2016 at 21:04, Christopher Covington <cov@codeaurora.org> wrote:
> The definition of the major() and minor() macros are moving within glibc to
> <sys/sysmacros.h>. Include this header when it is available to avoid the
> following sorts of build-stopping messages:
>
> qga/commands-posix.c: In function ‘dev_major_minor’:
> qga/commands-posix.c:656:13: error: In the GNU C Library, "major" is defined
>  by <sys/sysmacros.h>. For historical compatibility, it is
>  currently defined by <sys/types.h> as well, but we plan to
>  remove this soon. To use "major", include <sys/sysmacros.h>
>  directly. If you did not intend to use a system-defined macro
>  "major", you should undefine it after including <sys/types.h>. [-Werror]
>          *devmajor = major(st.st_rdev);
>              ^~~~~~~~~~~~~~~~~~~~~~~~~~
>
> qga/commands-posix.c:657:13: error: In the GNU C Library, "minor" is defined
>  by <sys/sysmacros.h>. For historical compatibility, it is
>  currently defined by <sys/types.h> as well, but we plan to
>  remove this soon. To use "minor", include <sys/sysmacros.h>
>  directly. If you did not intend to use a system-defined macro
>  "minor", you should undefine it after including <sys/types.h>. [-Werror]
>          *devminor = minor(st.st_rdev);
>              ^~~~~~~~~~~~~~~~~~~~~~~~~~
>
> 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>
> ---

Applied to master, thanks.

-- PMM

  parent reply	other threads:[~2017-03-14 10:13 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
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 [this message]
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=CAFEAcA_k-iCk_-UguBN1WyfQU+oz70dFKaiXQ4yXonF3Wwamrw@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --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.