diff options
author | Jim Meyering <jim@meyering.net> | 1998-10-18 01:11:35 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1998-10-18 01:11:35 +0000 |
commit | a71cb7cad1283a4bfc51d5a8e76e6f9358064858 (patch) | |
tree | 15e930134e9e64933a7870965fd58b54f481b0df /lib/strftime.c | |
parent | e2d1b297e7670d1e62ad5d1f8352b4c58f341417 (diff) | |
download | coreutils-a71cb7cad1283a4bfc51d5a8e76e6f9358064858.tar.xz |
Declare localtime_r if necessary.
Diffstat (limited to 'lib/strftime.c')
-rw-r--r-- | lib/strftime.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/strftime.c b/lib/strftime.c index 33dec1328..7a41a4fd5 100644 --- a/lib/strftime.c +++ b/lib/strftime.c @@ -48,10 +48,9 @@ #include <ctype.h> #include <sys/types.h> /* Some systems define `time_t' here. */ -/* Some systems require <unistd.h> to be included before <time.h> - for localtime_r to be declared properly. */ -#if HAVE_UNISTD_H -# include <unistd.h> +/* Provide a declaration of localtime_r on systems that lack it. */ +#if ! defined HAVE_DECL_LOCALTIME_R +extern struct tm* localtime_r (); #endif #ifdef TIME_WITH_SYS_TIME |