changeset 3462:7d72e43f4a2d

attempt to fix LSB on Ubuntu 18.04
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 09 Jul 2019 11:59:56 +0200
parents 7fc9dd4882ec
children be2eeeaad86a
files Core/Toolbox.cpp
diffstat 1 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Core/Toolbox.cpp	Tue Jul 09 10:30:44 2019 +0200
+++ b/Core/Toolbox.cpp	Tue Jul 09 11:59:56 2019 +0200
@@ -139,6 +139,23 @@
   } U_ICUDATA_ENTRY_POINT = { 0.0, NULL };
 }
 
+#    if defined(__LSB_VERSION__)
+extern "C"
+{
+  /**
+   * The "tzname" global variable is declared as "extern" but is not
+   * defined in any compilation module, if using Linux Standard Base,
+   * as soon as OpenSSL or cURL is in use on Ubuntu >= 18.04 (glibc >=
+   * 2.27). The variable "__tzname" is always properly declared *and*
+   * defined. The reason is unclear, and is maybe a bug in the gcc 4.8
+   * linker that is used by LSB if facing a weak symbol (as "tzname").
+   * This makes Orthanc crash if the timezone is set to UTC.
+   * https://groups.google.com/d/msg/orthanc-users/0m8sxxwSm1E/2p8du_89CAAJ
+   **/
+  char *tzname[2] = { (char *) "GMT", (char *) "GMT" };
+}
+#    endif
+
 #  endif
 #endif