From: Gaius Mulley Date: Thu, 9 Nov 2023 16:14:43 +0000 (+0000) Subject: PR modula2/112110: fails to build on freebsd when compiling wrapclock.cc X-Git-Tag: releases/gcc-13.3.0~748 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61025fbaf989a57ebf44f76d397fb895be0210ac;p=thirdparty%2Fgcc.git PR modula2/112110: fails to build on freebsd when compiling wrapclock.cc This patch fixes a mangled #if #endif conditional section within wrapclock.cc. The conditional section in wrapclock_timezone should return 0 rather than return timezone. libgm2/ChangeLog: PR modula2/112110 * libm2iso/wrapclock.cc (timezone): Return 0 if unable to get the timezone from the tm struct. Signed-off-by: Gaius Mulley --- diff --git a/libgm2/libm2iso/wrapclock.cc b/libgm2/libm2iso/wrapclock.cc index 1f4ca8c325d0..887e0b1500f7 100644 --- a/libgm2/libm2iso/wrapclock.cc +++ b/libgm2/libm2iso/wrapclock.cc @@ -233,16 +233,9 @@ EXPORT(timezone) (void) localtime_r (&time, &result); return result.tm_gmtoff; } - else -#endif #endif - { -#if defined(HAVE_TIMEZONE) - return timezone; -#else - return 0; #endif - } + return 0; } /* istimezone returns 1 if timezone in wrapclock.cc can resolve the