diff options
author | Jim Meyering <jim@meyering.net> | 1998-10-18 01:10:21 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1998-10-18 01:10:21 +0000 |
commit | e2d1b297e7670d1e62ad5d1f8352b4c58f341417 (patch) | |
tree | b9100e258342dc26511eff16c1cf2fb7f19efff2 | |
parent | 70bea7fd3e67044be22ead18f7ba92a20e7954c2 (diff) | |
download | coreutils-e2d1b297e7670d1e62ad5d1f8352b4c58f341417.tar.gz |
Declare localtime_r if necessary.
-rw-r--r-- | lib/mktime.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/mktime.c b/lib/mktime.c index a1b71e573..587aaf12c 100644 --- a/lib/mktime.c +++ b/lib/mktime.c @@ -46,15 +46,14 @@ # define LEAP_SECONDS_POSSIBLE 1 #endif -/* 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> -#endif - #include <sys/types.h> /* Some systems define `time_t' here. */ #include <time.h> +/* Provide a declaration of localtime_r on systems that lack it. */ +#if ! defined HAVE_DECL_LOCALTIME_R +extern struct tm* localtime_r (); +#endif + #if HAVE_LIMITS_H # include <limits.h> #endif |