From f214bc2a0843132abcc794c06771640405476816 Mon Sep 17 00:00:00 2001 From: Daniel Gryniewicz Date: Fri, 6 Jul 2007 01:46:06 +0000 Subject: Fix timezone offsets on fbsd. bug #183708 (Portage version: 2.1.3_rc6) --- .../evolution/files/evolution-2.10.2-fbsd.patch | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 mail-client/evolution/files/evolution-2.10.2-fbsd.patch (limited to 'mail-client/evolution/files') diff --git a/mail-client/evolution/files/evolution-2.10.2-fbsd.patch b/mail-client/evolution/files/evolution-2.10.2-fbsd.patch new file mode 100644 index 000000000000..c7a35e57eb1b --- /dev/null +++ b/mail-client/evolution/files/evolution-2.10.2-fbsd.patch @@ -0,0 +1,35 @@ +diff --exclude-from=/home/dang/.scripts/diffrc -up -ruN evolution-2.10.2.orig/widgets/e-timezone-dialog/e-timezone-dialog.c evolution-2.10.2/widgets/e-timezone-dialog/e-timezone-dialog.c +--- evolution-2.10.2.orig/widgets/e-timezone-dialog/e-timezone-dialog.c 2007-04-09 09:10:21.000000000 -0400 ++++ evolution-2.10.2/widgets/e-timezone-dialog/e-timezone-dialog.c 2007-07-05 21:24:05.000000000 -0400 +@@ -80,7 +80,9 @@ struct _ETimezoneDialogPrivate { + + #ifndef G_OS_WIN32 /* Declared properly in time.h already */ + extern char *tzname[2]; ++#ifndef __BSD_VISIBLE + extern long timezone; ++#endif + extern int daylight; + #endif + +@@ -322,9 +324,20 @@ static const icaltimezone* + get_local_timezone() + { + icaltimezone *zone; ++ long offset; ++#ifdef __BSD_VISIBLE ++ time_t tt; ++ struct tm tm; ++#endif + + tzset(); +- zone = icaltimezone_get_builtin_timezone_from_offset (-timezone, tzname[0]); ++#ifdef __BSD_VISIBLE ++ localtime_r (&tt, &tm); ++ offset = tm.tm_gmtoff; ++#else ++ offset = -timezone; ++#endif ++ zone = icaltimezone_get_builtin_timezone_from_offset (offset, tzname[0]); + + return zone; + } -- cgit v1.2.3-65-gdbad