From 9b2a901fb4045b97c7c940398bf53db229d5da68 Mon Sep 17 00:00:00 2001 From: joerg Date: Wed, 15 Oct 2014 22:11:24 +0000 Subject: Don't use ftime. --- archivers/lz4/distinfo | 3 ++- archivers/lz4/patches/patch-programs_frametest.c | 28 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 archivers/lz4/patches/patch-programs_frametest.c (limited to 'archivers') 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 + #include // fgets, sscanf +-#include // timeb ++#include // timeb + #include // 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); + } + + -- cgit v1.2.3