diff options
author | Jean Delvare <jdelvare@suse.de> | 2019-08-26 10:10:04 +0200 |
---|---|---|
committer | Ondřej Lysoněk <olysonek@redhat.com> | 2019-09-02 13:42:00 +0200 |
commit | 4ab7331755d376cc003c954078c2c78ca8eae507 (patch) | |
tree | 784688d0373219db6cf761558e6b6de4a7032a8f /lib/init.c | |
parent | 7478a7da14d948e4cd738d515e1d20ab7e528701 (diff) | |
download | lm-sensors-git-4ab7331755d376cc003c954078c2c78ca8eae507.tar.gz |
libsensors: Prevent warning with glibc >= 2.20
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>
Diffstat (limited to 'lib/init.c')
-rw-r--r-- | lib/init.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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> |