summaryrefslogtreecommitdiff
path: root/libxslt/libxslt-bsd.patch
blob: cbb9efee687a6c01e7f21fd1ca19eea8dfcf540a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--- misc/libxslt-1.1.26/libexslt/date.c.orig	2007-09-07 10:59:04.000000000 -0500
+++ misc/build/libxslt-1.1.26/libexslt/date.c	2007-09-07 10:59:21.000000000 -0500
@@ -28,7 +28,7 @@
 #include "config.h"
 #endif
 
-#if HAVE_LOCALTIME_R	/* _POSIX_SOURCE required by gnu libc */
+#if defined(HAVE_LOCALTIME_R) && defined(__GLIBC__)	/* _POSIX_SOURCE required by gnu libc */
 #ifndef _AIX51		/* but on AIX we're not using gnu libc */
 #define _POSIX_SOURCE
 #endif
--- misc/libxslt-1.1.26/libxslt/extra.c.orig	2009-05-12 01:29:34.000000000 -0500
+++ misc/build/libxslt-1.1.26/libxslt/extra.c	2011-11-14 20:46:39.000000000 -0500
@@ -243,8 +243,11 @@
      * Calling localtime() has the side-effect of setting timezone.
      * After we know the timezone, we can adjust for it
      */
+#if !defined(__FreeBSD__)
     lmt = gmt - timezone;
-
+#else	/* FreeBSD DOESN'T HAVE such side-ffect */
+    lmt = gmt - local_tm->tm_gmtoff;
+#endif
     /*
      * FIXME: it's been too long since I did manual memory management.
      * (I swore never to do it again.) Does this introduce a memory leak?