Date: Tue, 8 May 2012 21:59:18 -0700 (PDT) From: "Ronald F.Guilmette" <rfg@tristatelogic.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/167726: FreeBSD patch for gthumb-2.14.1_1 is just plain wrong Message-ID: <20120509045918.C978D5081B@segfault.tristatelogic.com> Resent-Message-ID: <201205090500.q4950Rsi091165@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 167726 >Category: ports >Synopsis: FreeBSD patch for gthumb-2.14.1_1 is just plain wrong >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed May 09 05:00:27 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Ronald F. Guilmette >Release: FreeBSD 8.3-RELEASE amd64 >Organization: entropy >Environment: System: FreeBSD segfault.tristatelogic.com 8.3-RELEASE FreeBSD 8.3-RELEASE #0: Mon Apr 9 21:23:18 UTC 2012 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: There is file currently present in the ports tree called: /usr/ports/graphics/gthumb/files/patch-glib-utils.c This patch (or something like it) is indeed necessary in order to make gthumb-2.14.x build successfully. However the patch itself is quite self-evidently wrong. It causes `offset' to always be set to zero, to no apparently useful effect (since the value gets re-set to the value of tm->tm_gmtoff just two lines further down in the code) and also, the patch in question fails to make allowances for possible host systems where neither HAVE_TM_GMTOFF nor HAVE_TIMEZONE are defined. A more correct patch for gthumb-2.14.x is provided below. >How-To-Repeat: cd /usr/ports/graphics/gthumb make >Fix: diff -rc2 gthumb/glib-utils.c gthumb/glib-utils.c *** gthumb/glib-utils.c 2012-03-24 09:28:46.000000000 -0700 --- gthumb/glib-utils.c 2012-05-05 18:48:21.000000000 -0700 *************** *** 553,560 **** int offset; - offset = -timezone; #if defined (HAVE_TM_GMTOFF) offset = tm->tm_gmtoff; #elif defined (HAVE_TIMEZONE) if (tm->tm_isdst > 0) { #if defined (HAVE_ALTZONE) --- 553,560 ---- int offset; #if defined (HAVE_TM_GMTOFF) offset = tm->tm_gmtoff; #elif defined (HAVE_TIMEZONE) + offset = -timezone; if (tm->tm_isdst > 0) { #if defined (HAVE_ALTZONE) *************** *** 565,568 **** --- 565,570 ---- } else offset = -timezone; + #else + offset = 0; #endif >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120509045918.C978D5081B>