xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools: Include <sys/sysmacros.h> due to glibc 2.25
@ 2017-03-14 17:38 Anthony PERARD
  2017-03-15  6:54 ` Olaf Hering
  0 siblings, 1 reply; 2+ messages in thread
From: Anthony PERARD @ 2017-03-14 17:38 UTC (permalink / raw)
  To: xen-devel; +Cc: Anthony PERARD, Wei Liu, Ian Jackson

To fix the follwing error with glibc 2.25:
tap-ctl-allocate.c:109:13: error: In the GNU C Library, "makedev" 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 "makedev", include <sys/sysmacros.h>
 directly. If you did not intend to use a system-defined macro
 "makedev", you should undefine it after including <sys/types.h>. [-Werror]
  err = mknod(devname, perm, makedev(major, minor));
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Same thing with major() and minor() in
libxl__device_physdisk_major_minor().

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 tools/blktap2/control/tap-ctl-allocate.c | 1 +
 tools/libxl/libxl_internal.h             | 1 +
 2 files changed, 2 insertions(+)

diff --git a/tools/blktap2/control/tap-ctl-allocate.c b/tools/blktap2/control/tap-ctl-allocate.c
index 8a6471e987..0f15175cc7 100644
--- a/tools/blktap2/control/tap-ctl-allocate.c
+++ b/tools/blktap2/control/tap-ctl-allocate.c
@@ -36,6 +36,7 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <sys/ioctl.h>
+#include <sys/sysmacros.h>
 #include <linux/major.h>
 
 #include "tap-ctl.h"
diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
index 5bbede532e..235500dd06 100644
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -47,6 +47,7 @@
 #include <sys/socket.h>
 #include <sys/file.h>
 #include <sys/ioctl.h>
+#include <sys/sysmacros.h>
 
 #include <xenevtchn.h>
 #include <xenstore.h>
-- 
Anthony PERARD


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

end of thread, other threads:[~2017-03-15  6:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-14 17:38 [PATCH] tools: Include <sys/sysmacros.h> due to glibc 2.25 Anthony PERARD
2017-03-15  6:54 ` Olaf Hering

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).