diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2014-08-24 03:10:57 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2014-08-24 03:10:57 +0000 |
commit | 4202f1180bb6951338e094912586c9780ec8b044 (patch) | |
tree | f95e66fe88343ff49822dc5ccb2da19fde86a828 /lib | |
parent | 1758db773edd8b472ca4927930e148a92bbfaca1 (diff) | |
download | netpbm-mirror-4202f1180bb6951338e094912586c9780ec8b044.tar.gz netpbm-mirror-4202f1180bb6951338e094912586c9780ec8b044.tar.xz netpbm-mirror-4202f1180bb6951338e094912586c9780ec8b044.zip |
Declare _XOPEN_SOURCE >= 500 to make strdup defined
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2257 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pmfileio.c | 3 | ||||
-rw-r--r-- | lib/util/nstring.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/pmfileio.c b/lib/pmfileio.c index 1263261a..908e793a 100644 --- a/lib/pmfileio.c +++ b/lib/pmfileio.c @@ -10,7 +10,8 @@ does it in other libc's). pm_config.h defines TMPDIR as P_tmpdir in some environments. */ -#define _XOPEN_SOURCE 600 /* Make sure ftello, fseeko are defined */ +#define _BSD_SOURCE /* Make sure strdup is defined */ +#define _XOPEN_SOURCE 600 /* Make sure ftello, fseeko, strdup are defined */ #define _LARGEFILE_SOURCE 1 /* Make sure ftello, fseeko are defined */ #define _LARGEFILE64_SOURCE 1 #define _FILE_OFFSET_BITS 64 diff --git a/lib/util/nstring.c b/lib/util/nstring.c index bb2ba92e..1fe66a27 100644 --- a/lib/util/nstring.c +++ b/lib/util/nstring.c @@ -113,6 +113,8 @@ */ +#define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ +#define _BSD_SOURCE /* Make sure strdup() is in string.h */ #define _GNU_SOURCE /* Because of conditional compilation, this is GNU source only if the C library is GNU. |