From: Eric Blake <eblake@redhat.com>
To: Andreas Grapentin <andreas@grapentin.org>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 0/1] major / minor macros are to be included from <sys/sysmacros.h>
Date: Tue, 14 Mar 2017 08:37:31 -0500 [thread overview]
Message-ID: <cb635189-1c52-8b30-d33d-e593febc2a2e@redhat.com> (raw)
In-Reply-To: <20170314101925.16792-1-andreas@grapentin.org>
[-- Attachment #1: Type: text/plain, Size: 1119 bytes --]
On 03/14/2017 05:19 AM, Andreas Grapentin wrote:
> Building qemu fails with glibc-2.25 and gcc-6.3.1:
>
>> qemu/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);
>> ^~~~~~~~~~~~~~~~~~~~~~~~~~
>
> A trivial fix is to #include <sys/sysmacros.h> in the respective files.
>
>
> Andreas Grapentin (1):
> major / minor macros are to be included from <sys/sysmacros.h>
NACK. <sys/sysmacros.h> is not a universal file, so you can't blindly
include it without first checking that it exists. We already fixed the
problem correctly in commit 4d04351, which just landed today.
--
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 --]
prev parent reply other threads:[~2017-03-14 13:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-14 10:19 [Qemu-devel] [PATCH 0/1] major / minor macros are to be included from <sys/sysmacros.h> Andreas Grapentin
2017-03-14 10:19 ` [Qemu-devel] [PATCH 1/1] " Andreas Grapentin
2017-03-14 13:37 ` Eric Blake [this message]
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=cb635189-1c52-8b30-d33d-e593febc2a2e@redhat.com \
--to=eblake@redhat.com \
--cc=andreas@grapentin.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).