From: Jim Meyering Date: Sun, 18 Oct 1998 01:11:35 +0000 (+0000) Subject: Declare localtime_r if necessary. X-Git-Tag: FILEUTILS-4_0-b4~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a71cb7cad1283a4bfc51d5a8e76e6f9358064858;p=thirdparty%2Fcoreutils.git Declare localtime_r if necessary. --- diff --git a/lib/strftime.c b/lib/strftime.c index 33dec1328c..7a41a4fd56 100644 --- a/lib/strftime.c +++ b/lib/strftime.c @@ -48,10 +48,9 @@ #include #include /* Some systems define `time_t' here. */ -/* Some systems require to be included before - for localtime_r to be declared properly. */ -#if HAVE_UNISTD_H -# include +/* 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