summaryrefslogtreecommitdiff
path: root/archivers/lz4
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2014-10-15 22:11:24 +0000
committerjoerg <joerg@pkgsrc.org>2014-10-15 22:11:24 +0000
commit9b2a901fb4045b97c7c940398bf53db229d5da68 (patch)
tree58457ee0ab9c2cbceb08c0f5ffd53fbb9fa0242c /archivers/lz4
parentbc774c480f140014012a7caf2af9e01670591e22 (diff)
downloadpkgsrc-9b2a901fb4045b97c7c940398bf53db229d5da68.tar.gz
Don't use ftime.
Diffstat (limited to 'archivers/lz4')
-rw-r--r--archivers/lz4/distinfo3
-rw-r--r--archivers/lz4/patches/patch-programs_frametest.c28
2 files changed, 30 insertions, 1 deletions
diff --git a/archivers/lz4/distinfo b/archivers/lz4/distinfo
index 90b7376b3e4..c4f46cac17a 100644
--- a/archivers/lz4/distinfo
+++ b/archivers/lz4/distinfo
@@ -1,8 +1,9 @@
-$NetBSD: distinfo,v 1.2 2014/10/02 08:52:41 fhajny Exp $
+$NetBSD: distinfo,v 1.3 2014/10/15 22:11:24 joerg Exp $
SHA1 (lz4-r123.tar.gz) = 588d51ea02a0bc325229601412b1e829a4806413
RMD160 (lz4-r123.tar.gz) = 2a6c899dee8f84b619f7cdb8ec0cea3ebb273910
Size (lz4-r123.tar.gz) = 137315 bytes
SHA1 (patch-Makefile) = 223bf2c60dfd050ef4eb2e03feda988011686cdb
SHA1 (patch-programs_Makefile) = b248d8967966c482f9d2ee6d51faf245aca3aab1
+SHA1 (patch-programs_frametest.c) = 5966d6a46f4bc1ea6de64234ff162b32d5588b53
SHA1 (patch-programs_fuzzer.c) = 711c0e37128d983000bde1b42afec6f9ee9f0e85
diff --git a/archivers/lz4/patches/patch-programs_frametest.c b/archivers/lz4/patches/patch-programs_frametest.c
new file mode 100644
index 00000000000..a8ea32cba63
--- /dev/null
+++ b/archivers/lz4/patches/patch-programs_frametest.c
@@ -0,0 +1,28 @@
+$NetBSD: patch-programs_frametest.c,v 1.1 2014/10/15 22:11:24 joerg Exp $
+
+--- programs/frametest.c.orig 2014-10-15 12:42:00.000000000 +0000
++++ programs/frametest.c
+@@ -42,7 +42,7 @@
+ **************************************/
+ #include <stdlib.h>
+ #include <stdio.h> // fgets, sscanf
+-#include <sys/timeb.h> // timeb
++#include <sys/time.h> // timeb
+ #include <string.h> // strcmp
+ #include "lz4frame.h"
+ #include "xxhash.h" // XXH64
+@@ -113,11 +113,9 @@ static U32 pause = 0;
+ *********************************************************/
+ static U32 FUZ_GetMilliStart(void)
+ {
+- struct timeb tb;
+- U32 nCount;
+- ftime( &tb );
+- nCount = (U32) (((tb.time & 0xFFFFF) * 1000) + tb.millitm);
+- return nCount;
++ struct timeval tv;
++ gettimeofday(&tv, NULL);
++ return (tv.tv_usec/1000 + (tv.tv_sec & 0xfffff) * 1000);
+ }
+
+