]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR modula2/112110: fails to build on freebsd when compiling wrapclock.cc
authorGaius Mulley <gaiusmod2@gmail.com>
Thu, 9 Nov 2023 16:14:43 +0000 (16:14 +0000)
committerGaius Mulley <gaiusmod2@gmail.com>
Thu, 9 Nov 2023 16:14:43 +0000 (16:14 +0000)
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 <gaiusmod2@gmail.com>
libgm2/libm2iso/wrapclock.cc

index 1f4ca8c325d084f7414e4eb14b6cd0c3dfa88100..887e0b1500f75b6ca518ddfe2774efa04786726b 100644 (file)
@@ -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