[dm-devel] [PATCH] Include sys/sysmacros.h

Christophe Varoqui christophe.varoqui at opensvc.com
Fri Feb 10 14:41:46 UTC 2017


Applied.
Thanks.

On Wed, Jan 4, 2017 at 5:34 AM, Anthony Ryan <anthonyryan1 at gmail.com> wrote:

> The major, minor & makedev macros are not supposed to be included
> with sys/types.h but glibc has done this against POSIX standards.
>
> Alternative libcs aren't able to be used because of this and glibc
> has expressed interest in correcting this behaviour in a future
> release.
> ---
>  kpartx/dasd.c               | 1 +
>  kpartx/kpartx.c             | 1 +
>  libmultipath/checkers/tur.c | 1 +
>  libmultipath/devmapper.c    | 1 +
>  libmultipath/util.c         | 1 +
>  5 files changed, 5 insertions(+)
>
> diff --git a/kpartx/dasd.c b/kpartx/dasd.c
> index 1206e45..f50c1bd 100644
> --- a/kpartx/dasd.c
> +++ b/kpartx/dasd.c
> @@ -28,6 +28,7 @@
>  #include <inttypes.h>
>  #include <sys/types.h>
>  #include <sys/stat.h>
> +#include <sys/sysmacros.h>
>  #include <sys/ioctl.h>
>  #include <linux/hdreg.h>
>  #include <errno.h>
> diff --git a/kpartx/kpartx.c b/kpartx/kpartx.c
> index d31fea8..3452787 100644
> --- a/kpartx/kpartx.c
> +++ b/kpartx/kpartx.c
> @@ -28,6 +28,7 @@
>  #include <stdint.h>
>  #include <sys/ioctl.h>
>  #include <sys/stat.h>
> +#include <sys/sysmacros.h>
>  #include <sys/types.h>
>  #include <ctype.h>
>  #include <libdevmapper.h>
> diff --git a/libmultipath/checkers/tur.c b/libmultipath/checkers/tur.c
> index 4d6c3c2..d9a9e67 100644
> --- a/libmultipath/checkers/tur.c
> +++ b/libmultipath/checkers/tur.c
> @@ -11,6 +11,7 @@
>  #include <unistd.h>
>  #include <fcntl.h>
>  #include <sys/ioctl.h>
> +#include <sys/sysmacros.h>
>  #include <errno.h>
>  #include <sys/time.h>
>  #include <pthread.h>
> diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
> index 4f8ef13..9c0b240 100644
> --- a/libmultipath/devmapper.c
> +++ b/libmultipath/devmapper.c
> @@ -12,6 +12,7 @@
>  #include <ctype.h>
>  #include <unistd.h>
>  #include <errno.h>
> +#include <sys/sysmacros.h>
>
>  #include "checkers.h"
>  #include "vector.h"
> diff --git a/libmultipath/util.c b/libmultipath/util.c
> index 03a5738..1841f35 100644
> --- a/libmultipath/util.c
> +++ b/libmultipath/util.c
> @@ -4,6 +4,7 @@
>  #include <pthread.h>
>  #include <string.h>
>  #include <sys/stat.h>
> +#include <sys/sysmacros.h>
>  #include <sys/types.h>
>  #include <unistd.h>
>
> --
> 2.11.0
>
> --
> dm-devel mailing list
> dm-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20170210/df0d50aa/attachment.htm>


More information about the dm-devel mailing list