tools: Include <sys/sysmacros.h> due to glibc 2.25
PATCH 1/1 tools: Include <sys/sysmacros.h> due to glibc 2.25
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() inlibxl__device_physdisk_major_minor().
--- tools/blktap2/control/tap-ctl-allocate.c | 1 + tools/libxl/libxl_internal.h | 1 + 2 files changed, 2 insertions(+)
tools/blktap2/control/tap-ctl-allocate.c +1 -0
@@ -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"
tools/libxl/libxl_internal.h +1 -0
@@ -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>
Signature · 7 lines
Anthony PERARD _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 2 lines · Anthony PERARD
+++
b/tools/libxl/libxl_internal.h
+#include <sys/sysmacros.h>
There is a __linux__ section in that file.
I sent a similar patch yesterday, but with a wrong change for blktap2.
Olaf
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel