All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/1] major / minor macros are to be included from <sys/sysmacros.h>
@ 2017-03-14 10:19 Andreas Grapentin
  2017-03-14 10:19 ` [Qemu-devel] [PATCH 1/1] " Andreas Grapentin
  2017-03-14 13:37 ` [Qemu-devel] [PATCH 0/1] " Eric Blake
  0 siblings, 2 replies; 3+ messages in thread
From: Andreas Grapentin @ 2017-03-14 10:19 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Andreas Grapentin

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-03-14 13:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [Qemu-devel] [PATCH 0/1] " Eric Blake

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.