lm-sensors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ondřej Lysoněk" <olysonek@redhat.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [PATCH] libsensors: Prevent warning with glibc >= 2.20
Date: Mon, 02 Sep 2019 11:48:00 +0000	[thread overview]
Message-ID: <flssgpe6hsf.fsf@redhat.com> (raw)

Jean Delvare <jdelvare@suse.de> writes:

> Since glibc 2.20, the usage of _BSD_SOURCE is deprecated. Fix it like
> described here:
>
> https://sourceware.org/glibc/wiki/Release/2.20#Deprecation_of__BSD_SOURCE_and__SVID_SOURCE_feature_macros
>
> Inspired from a similar patch by Wolfram Sang for i2c-tools.
>
> Signed-off-by: Jean Delvare <jdelvare@suse.de>
> ---
>  lib/init.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> --- lm-sensors.orig/lib/init.c	2016-08-03 13:25:00.101098040 +0200
> +++ lm-sensors/lib/init.c	2016-08-03 13:25:12.934237590 +0200
> @@ -20,7 +20,8 @@
>  */
>  
>  /* Needed for scandir() and alphasort() */
> -#define _BSD_SOURCE
> +#define _BSD_SOURCE 1 /* for glibc < 2.19 */
> +#define _DEFAULT_SOURCE 1 /* for glibc >= 2.19 */
>  
>  #include <sys/types.h>
>  #include <sys/stat.h>
>
>
> -- 
> Jean Delvare
> SUSE L3 Support

Thanks, Jean! Applied.

Ondřej Lysoněk

             reply	other threads:[~2019-09-02 11:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-02 11:48 Ondřej Lysoněk [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-08-26  8:10 [PATCH] libsensors: Prevent warning with glibc >= 2.20 Jean Delvare

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=flssgpe6hsf.fsf@redhat.com \
    --to=olysonek@redhat.com \
    --cc=lm-sensors@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).