summaryrefslogtreecommitdiff
path: root/math/lp_solve/patches/patch-aa
diff options
context:
space:
mode:
Diffstat (limited to 'math/lp_solve/patches/patch-aa')
-rw-r--r--math/lp_solve/patches/patch-aa29
1 files changed, 29 insertions, 0 deletions
diff --git a/math/lp_solve/patches/patch-aa b/math/lp_solve/patches/patch-aa
new file mode 100644
index 00000000000..14727af88b2
--- /dev/null
+++ b/math/lp_solve/patches/patch-aa
@@ -0,0 +1,29 @@
+$NetBSD: patch-aa,v 1.1.1.1 2010/10/16 15:35:08 wiz Exp $
+
+ftime() is deprecated, use gettimeofday() instead.
+
+--- shared/commonlib.c.orig 2009-02-01 19:31:59.000000000 +0000
++++ shared/commonlib.c
+@@ -6,7 +6,7 @@
+ #elif defined EnhTime
+ # include <windows.h>
+ #else
+-# include <sys/timeb.h>
++# include <sys/time.h>
+ #endif
+
+ #include <stdlib.h>
+@@ -844,10 +844,10 @@ double timeNow(void)
+ }
+ return( timeBase + (double) now.QuadPart/(double) freq.QuadPart );
+ #else
+- struct timeb buf;
++ struct timeval buf;
+
+- ftime(&buf);
+- return((double)buf.time+((double) buf.millitm)/1000.0);
++ gettimeofday(&buf, NULL);
++ return((double)buf.tv_sec+((double) buf.tv_usec)/1000000.0);
+ #endif
+ }
+