diff options
author | willson-chen <willson.chenwx@gmail.com> | 2019-07-30 16:01:13 +0800 |
---|---|---|
committer | Cosmin Truta <ctruta@gmail.com> | 2020-04-27 00:46:06 -0400 |
commit | 52ee16764409ad3eb3513434b4faa19c45a16079 (patch) | |
tree | 477268f1ce9d1ea7367250fcc9b1a6e3591ea2b6 /contrib | |
parent | eb6767273a4eb5d6f4ad528370d7262cf7aa220c (diff) | |
download | libpng-52ee16764409ad3eb3513434b4faa19c45a16079.tar.gz |
Fix a warning on Linux caused by _BSD_SOURCE
I got a warning while compiling under Ubuntu 18.04 and gcc 7.4:
"__BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
Quote from the Linux Programmer's Manual:
"To allow code that requires _BSD_SOURCE in glibc 2.19 and earlier and
_DEFAULT_SOURCE in glibc 2.20 and later to compile without warnings,
define both _BSD_SOURCE and _DEFAULT_SOURCE."
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/libtests/pngvalid.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/libtests/pngvalid.c b/contrib/libtests/pngvalid.c index d800110c7..9a2da6a02 100644 --- a/contrib/libtests/pngvalid.c +++ b/contrib/libtests/pngvalid.c @@ -22,6 +22,7 @@ #define _ISOC99_SOURCE 1 /* For floating point */ #define _GNU_SOURCE 1 /* For the floating point exception extension */ #define _BSD_SOURCE 1 /* For the floating point exception extension */ +#define _DEFAULT_SOURCE 1 /* For the floating point exception extension */ #include <signal.h> #include <stdio.h> |