All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] build: handle deprecation of major() in sys/types.h
@ 2016-09-22 20:56 Radim Krčmář
  2016-09-22 21:09 ` Marc-André Lureau
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Radim Krčmář @ 2016-09-22 20:56 UTC (permalink / raw)
  To: qemu-devel

GCC 6.2.1 stops the build of qga/commands-posix.c with:

  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 #undef it after including <sys/types.h>.

Include <sys/sysmacros.h> for all users of <sys/types.h>.

Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
---
 include/qemu/osdep.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 9e9fa6154642..fad31c3d5b56 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -64,6 +64,7 @@ extern int daemon(int, int);
 #include <stdbool.h>
 #include <stdint.h>
 #include <sys/types.h>
+#include <sys/sysmacros.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-- 
2.10.0

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

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

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.