[Bug 268795] x11/mate-panel: fix build with clang 15

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 07 Jan 2023 00:32:06 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268795

            Bug ID: 268795
           Summary: x11/mate-panel: fix build with clang 15
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: gnome@FreeBSD.org
          Reporter: dim@FreeBSD.org
          Assignee: gnome@FreeBSD.org
             Flags: maintainer-feedback?(gnome@FreeBSD.org)

During an exp-run for llvm 15 (see bug 265425), it turned out that
x11/mate-panel failed to build with clang 15:

  clock-location.c:454:22: error: incompatible pointer to integer conversion
assigning to 'glong' (aka 'long') from 'char *(int, int)' [-Wint-conversion]
          sys_timezone = timezone;
                       ^ ~~~~~~~~
  clock-location.c:462:24: error: incompatible pointer to integer conversion
assigning to 'glong' (aka 'long') from 'char *(int, int)' [-Wint-conversion]
          local_timezone = timezone;
                         ^ ~~~~~~~~

This is because 'timezone' as a global external variable does not exist on
FreeBSD: it is a glibc-ism. Use struct tm's tm_gmtoff field instead, which has
its sign reversed from the glibc global. There is also no need to manually
account for DST, as tm_gmtoff includes that.

-- 
You are receiving this mail because:
You are the assignee for the bug.