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)
commit796dea37fb229c34740f98bf80f3263d7a4e3c6d
tree61bcc2be98e707401be258bbf895c52d9548605e
parent15e90cd01f68ff8b23b426e7f91155b81d73db13
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@aepfle.de>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/blktap2/control/tap-ctl-allocate.c
tools/libxl/libxl_osdeps.h