grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] include sys/sysmacros.h for getting major() definition


From: Andrei Borzenkov
Subject: Re: [PATCH] include sys/sysmacros.h for getting major() definition
Date: Sun, 18 Dec 2016 23:11:27 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

18.12.2016 22:49, Khem Raj пишет:
> glibc 2.25 has deprecated inclusion of <sys/sysmacros.h> by <sys/types.h>
> 
> Signed-off-by: Khem Raj <address@hidden>
> ---
>  grub-core/osdep/linux/getroot.c | 2 +-
>  grub-core/osdep/unix/getroot.c  | 2 +-

There are more files using major()

>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
> index 09e7e6e..5923d17 100644
> --- a/grub-core/osdep/linux/getroot.c
> +++ b/grub-core/osdep/linux/getroot.c
> @@ -20,7 +20,7 @@
>  #include <config.h>
>  
>  #include <sys/stat.h>
> -#include <sys/types.h>
> +#include <sys/sysmacros.h>

We already do it:

#if defined(MAJOR_IN_MKDEV)
#include <sys/mkdev.h>
#elif defined(MAJOR_IN_SYSMACROS)
#include <sys/sysmacros.h>
#endif

If this check fails, please debug why it fails and fix check.

>  #include <assert.h>
>  #include <fcntl.h>
>  #include <unistd.h>
> diff --git a/grub-core/osdep/unix/getroot.c b/grub-core/osdep/unix/getroot.c
> index 4bf37b0..5aaa086 100644
> --- a/grub-core/osdep/unix/getroot.c
> +++ b/grub-core/osdep/unix/getroot.c
> @@ -20,7 +20,7 @@
>  #include <config.h>
>  
>  #include <sys/stat.h>
> -#include <sys/types.h>
> +#include <sys/sysmacros.h>
>  #include <assert.h>
>  #include <fcntl.h>
>  #include <unistd.h>
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]