]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
tools: include sys/sysmacros.h on Linux
authorOlaf Hering <olaf@aepfle.de>
Wed, 15 Mar 2017 07:01:34 +0000 (07:01 +0000)
committerWei Liu <wei.liu2@citrix.com>
Wed, 15 Mar 2017 10:22:33 +0000 (10:22 +0000)
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@aepfle.de>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/blktap2/control/tap-ctl-allocate.c
tools/libxl/libxl_osdeps.h

index 8a6471e987a4e655b7ee7f110b4bff5600be7805..187cadcde781c51eed1b02b7f8c1f2baecd5b702 100644 (file)
@@ -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>
index a40d62066b3b2fc04fa12bf937ce9703413d12aa..de1d24ecae7e19a82a58ee74942a9f124df2c2cb 100644 (file)
@@ -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__)