diff options
author | Gaius Mulley <gaiusmod2@gmail.com> | 2023-10-27 18:42:09 +0100 |
---|---|---|
committer | Gaius Mulley <gaiusmod2@gmail.com> | 2023-10-27 18:42:09 +0100 |
commit | 32cc0b82a3c2e38caa9f2266d4ba375ccb1fe9cc (patch) | |
tree | 9fdc4821b61c5a4cc4643967291b72d7766858c7 /libgm2/libm2iso | |
parent | c6430d3e6d3279c7e4be9d189031a17bb3dec347 (diff) | |
download | gcc-32cc0b82a3c2e38caa9f2266d4ba375ccb1fe9cc.zip gcc-32cc0b82a3c2e38caa9f2266d4ba375ccb1fe9cc.tar.gz gcc-32cc0b82a3c2e38caa9f2266d4ba375ccb1fe9cc.tar.bz2 |
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 <gaiusmod2@gmail.com>
Diffstat (limited to 'libgm2/libm2iso')
-rw-r--r-- | libgm2/libm2iso/wrapclock.cc | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/libgm2/libm2iso/wrapclock.cc b/libgm2/libm2iso/wrapclock.cc index a4d62b7..31ddeb5 100644 --- a/libgm2/libm2iso/wrapclock.cc +++ b/libgm2/libm2iso/wrapclock.cc @@ -235,16 +235,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 |