From: Jim Meyering Date: Sun, 18 Oct 1998 01:10:21 +0000 (+0000) Subject: Declare localtime_r if necessary. X-Git-Tag: FILEUTILS-4_0-b4~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e2d1b297e7670d1e62ad5d1f8352b4c58f341417;p=thirdparty%2Fcoreutils.git Declare localtime_r if necessary. --- diff --git a/lib/mktime.c b/lib/mktime.c index a1b71e573f..587aaf12c8 100644 --- a/lib/mktime.c +++ b/lib/mktime.c @@ -46,15 +46,14 @@ # define LEAP_SECONDS_POSSIBLE 1 #endif -/* Some systems require to be included before - for localtime_r to be declared properly. */ -#if HAVE_UNISTD_H -# include -#endif - #include /* Some systems define `time_t' here. */ #include +/* 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 #endif