From: Harlan Stenn Date: Sun, 29 Dec 2013 07:55:28 +0000 (+0000) Subject: [Bug 2519] mktime.c does not compile on 64-bit Solaris but we do not need timegm... X-Git-Tag: NTP_4_2_7P407~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=087251d2521e6bf2c4626cc65002448b932fc323;p=thirdparty%2Fntp.git [Bug 2519] mktime.c does not compile on 64-bit Solaris but we do not need timegm() and the Solaris provides mktime() bk: 52bfd570JhhaXr8U2XlQs8Pzgd3C9Q --- diff --git a/ChangeLog b/ChangeLog index ceec96b6b..4c27e9912 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ +* [Bug 2519] mktime.c does not compile on 64-bit Solaris but we do not + need timegm() and the Solaris provides mktime(). * [Bug 2522] Revert Bug 2513 fix - it breaks backward compatibility. (4.2.7p406) 2013/12/28 Released by Harlan Stenn * [Bug 2521] VPATH tweaks for perl -opts files. diff --git a/libntp/mktime.c b/libntp/mktime.c index 08dbd4171..50d2a0810 100644 --- a/libntp/mktime.c +++ b/libntp/mktime.c @@ -62,7 +62,7 @@ #include #include "ntp_machine.h" -#if !defined(HAVE_MKTIME) || !defined(HAVE_TIMEGM) +#if !defined(HAVE_MKTIME) || ( !defined(HAVE_TIMEGM) && defined(WANT_TIMEGM) ) #if SIZEOF_TIME_T >= 8 #error libntp supplied mktime()/timegm() do not support 64-bit time_t @@ -289,6 +289,7 @@ mktime( } #endif /* !HAVE_MKTIME */ +#ifdef WANT_TIMEGM #ifndef HAVE_TIMEGM time_t timegm( @@ -306,3 +307,4 @@ timegm( return WRONG; } #endif /* !HAVE_TIMEGM */ +#endif /* WANT_TIMEGM */