summaryrefslogtreecommitdiff
path: root/math/octave/patches/patch-ai
diff options
context:
space:
mode:
Diffstat (limited to 'math/octave/patches/patch-ai')
-rw-r--r--math/octave/patches/patch-ai23
1 files changed, 23 insertions, 0 deletions
diff --git a/math/octave/patches/patch-ai b/math/octave/patches/patch-ai
new file mode 100644
index 00000000000..ebd53a0ad34
--- /dev/null
+++ b/math/octave/patches/patch-ai
@@ -0,0 +1,23 @@
+$NetBSD: patch-ai,v 1.3 2008/01/11 01:23:44 adam Exp $
+
+--- liboctave/oct-time.cc.orig 2007-12-10 07:26:20.000000000 +0100
++++ liboctave/oct-time.cc
+@@ -34,6 +34,8 @@ along with Octave; see the file COPYING.
+ #include <unistd.h>
+ #endif
+
++#include <time.h>
++
+ #if defined (OCTAVE_USE_WINDOWS_API)
+ #include <windows.h>
+ #undef min
+@@ -355,6 +357,9 @@ octave_strptime::init (const std::string
+ char *p = strsave (str.c_str ());
+
+ char *q = oct_strptime (p, fmt.c_str (), &t);
++ /* fill in wday and yday */
++ t.tm_isdst = -1;
++ mktime(&t);
+
+ // Fill in wday and yday, but only if mday is valid and the mon and year
+ // are filled in, avoiding issues with mktime and invalid dates.