[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] 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() in libxl__device_physdisk_major_minor(). Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> --- 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@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |