[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] tools: include sys/sysmacros.h on Linux



commit 796dea37fb229c34740f98bf80f3263d7a4e3c6d
Author:     Olaf Hering <olaf@xxxxxxxxx>
AuthorDate: Wed Mar 15 07:01:34 2017 +0000
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Wed Mar 15 10:22:33 2017 +0000

    tools: include sys/sysmacros.h on Linux
    
    Due to a bug in the glibc headers the macros makedev(), major() and
    minor() where avaialble by including sys/types.h. This bug was
    addressed in glibc-2.25 by introducing a warning when these macros are
    used. Since Xen is build with -Werror this new warning cause a compile
    error.
    
    Use sys/sysmacros.h to define these three macros.
    
    blktap2 is already Linux specific. The kernel header which was used to
    get makedev() does not provided it anymore, and it was wrong to use a
    kernel header anyway.
    
    Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 tools/blktap2/control/tap-ctl-allocate.c | 1 +
 tools/libxl/libxl_osdeps.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 8a6471e..187cadc 100644
--- a/tools/blktap2/control/tap-ctl-allocate.c
+++ b/tools/blktap2/control/tap-ctl-allocate.c
@@ -33,6 +33,7 @@
 #include <string.h>
 #include <getopt.h>
 #include <libgen.h>
+#include <sys/sysmacros.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <sys/ioctl.h>
diff --git a/tools/libxl/libxl_osdeps.h b/tools/libxl/libxl_osdeps.h
index a40d620..de1d24e 100644
--- a/tools/libxl/libxl_osdeps.h
+++ b/tools/libxl/libxl_osdeps.h
@@ -39,6 +39,7 @@
 #define SYSFS_PCI_DEV          "/sys/bus/pci/devices"
 #define SYSFS_PCIBACK_DRIVER   "/sys/bus/pci/drivers/pciback"
 #define NETBACK_NIC_NAME       "vif%u.%d"
+#include <sys/sysmacros.h>
 #include <pty.h>
 #include <uuid/uuid.h>
 #elif defined(__sun__)
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.