Message ID | 20170314173800.23502-1-anthony.perard@citrix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Mar 14, Anthony PERARD wrote: > +++ 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
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>
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(+)