From: Olaf Hering <olaf@aepfle.de>
To: xen-devel@lists.xen.org
Cc: Wei Liu <wei.liu2@citrix.com>, Olaf Hering <olaf@aepfle.de>,
Ian Jackson <ian.jackson@eu.citrix.com>
Subject: [PATCH] tools: include sys/sysmacros.h on Linux
Date: Tue, 14 Mar 2017 07:37:04 +0000 [thread overview]
Message-ID: <20170314073704.28345-1-olaf@aepfle.de> (raw)
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>
---
tools/blktap2/control/tap-ctl-allocate.c | 2 +-
tools/libxl/libxl_osdeps.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/blktap2/control/tap-ctl-allocate.c b/tools/blktap2/control/tap-ctl-allocate.c
index 8a6471e987..908c87f305 100644
--- a/tools/blktap2/control/tap-ctl-allocate.c
+++ b/tools/blktap2/control/tap-ctl-allocate.c
@@ -36,7 +36,7 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/ioctl.h>
-#include <linux/major.h>
+#include <sys/sysmacros.h>
#include "tap-ctl.h"
#include "blktap2.h"
diff --git a/tools/libxl/libxl_osdeps.h b/tools/libxl/libxl_osdeps.h
index a40d62066b..de1d24ecae 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__)
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next reply other threads:[~2017-03-14 7:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-14 7:37 Olaf Hering [this message]
2017-03-14 11:43 ` [PATCH] tools: include sys/sysmacros.h on Linux Wei Liu
2017-03-14 11:54 ` Wei Liu
2017-03-14 12:08 ` Olaf Hering
2017-03-14 12:10 ` Wei Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170314073704.28345-1-olaf@aepfle.de \
--to=olaf@aepfle.de \
--cc=ian.jackson@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.