From a71cb7cad1283a4bfc51d5a8e76e6f9358064858 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 18 Oct 1998 01:11:35 +0000 Subject: [PATCH] Declare localtime_r if necessary. --- lib/strftime.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 -- 2.47.3