forked from QubesOS/qubes-vmm-xen
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpatch-0001-tools-include-sys-sysmacros.h-on-Linux.patch
52 lines (46 loc) · 1.79 KB
/
patch-0001-tools-include-sys-sysmacros.h-on-Linux.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From 796dea37fb229c34740f98bf80f3263d7a4e3c6d Mon Sep 17 00:00:00 2001
From: Olaf Hering <[email protected]>
Date: Wed, 15 Mar 2017 07:01:34 +0000
Subject: [PATCH] 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 <[email protected]>
Acked-by: Wei Liu <[email protected]>
Signed-off-by: Frédéric Pierret (Epitre) <[email protected]>
---
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 d9661c9..1837c01 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__)
--
2.5.5