qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Grapentin <andreas@grapentin.org>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, Andreas Grapentin <andreas@grapentin.org>
Subject: [Qemu-devel] [PATCH 0/1] major / minor macros are to be included from <sys/sysmacros.h>
Date: Tue, 14 Mar 2017 11:19:24 +0100	[thread overview]
Message-ID: <20170314101925.16792-1-andreas@grapentin.org> (raw)

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>

 hw/9pfs/9p.c         | 1 +
 qga/commands-posix.c | 1 +
 2 files changed, 2 insertions(+)

-- 
2.12.0

             reply	other threads:[~2017-03-14 10:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-14 10:19 Andreas Grapentin [this message]
2017-03-14 10:19 ` [Qemu-devel] [PATCH 1/1] major / minor macros are to be included from <sys/sysmacros.h> Andreas Grapentin
2017-03-14 13:37 ` [Qemu-devel] [PATCH 0/1] " Eric Blake

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=20170314101925.16792-1-andreas@grapentin.org \
    --to=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).