On Wed,  9 Sep 2015 11:57:47 +0200
Bernhard Nortmann <[email protected]> wrote:

> With glibc 2.20 (and newer), defining _BSD_SOURCE (only)
> will now generate compiler warnings similar to:
> 
> /usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE
> and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
> 
> See the glibc 2.20 release notes, https://lwn.net/Articles/611162/.
> 
> This patch adds the required _DEFAULT_SOURCE.
> 
> Signed-off-by: Bernhard Nortmann <[email protected]>
> ---
>  fel.c          | 2 ++
>  phoenix_info.c | 2 ++
>  pio.c          | 2 ++
>  3 files changed, 6 insertions(+)
> 
> diff --git a/fel.c b/fel.c
> index f96cc78..98e8d89 100644
> --- a/fel.c
> +++ b/fel.c
> @@ -16,6 +16,8 @@
>   */
>  
>  /* Needs _BSD_SOURCE for htole and letoh  */
> +/* glibc 2.20+ also requires _DEFAULT_SOURCE */
> +#define _DEFAULT_SOURCE
>  #define _BSD_SOURCE
>  #define _NETBSD_SOURCE
>  
> diff --git a/phoenix_info.c b/phoenix_info.c
> index b76c5e4..bf84cf0 100644
> --- a/phoenix_info.c
> +++ b/phoenix_info.c
> @@ -16,6 +16,8 @@
>   */
>  
>  /* Needs _BSD_SOURCE for htole and letoh  */
> +/* glibc 2.20+ also requires _DEFAULT_SOURCE */
> +#define _DEFAULT_SOURCE
>  #define _BSD_SOURCE
>  
>  #include <stdio.h>
> diff --git a/pio.c b/pio.c
> index 7ef4514..fc90190 100644
> --- a/pio.c
> +++ b/pio.c
> @@ -18,6 +18,8 @@
>   */
>  
>  /* needs _BSD_SOURCE for htole and letoh  */
> +/* glibc 2.20+ also requires _DEFAULT_SOURCE */
> +#define _DEFAULT_SOURCE
>  #define _BSD_SOURCE
>  
>  #include <errno.h>

Thanks, pushed this and also your other typo fix patch
to the sunxi-tools repository.

-- 
Best regards,
Siarhei Siamashka

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to