Skip to content

major / minor macros are to be included from <sys/sysmacros.h>

Andreas Grapentin qemu-devel qemu-trivial 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1major / minor macros are to be included from <sys/sysmacros.h>hw/9pfs/9p.c qga/commands-posix.c+2 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/1] major / minor macros are to be included from <sys/sysmacros.h>

Building qemu fails with glibc-2.25 and gcc-6.3.1:

Quoted 8 lines

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(+)
Signature · 1 line
2.12.0