summaryrefslogtreecommitdiff
path: root/benchmarks/bytebench/patches/patch-ag
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks/bytebench/patches/patch-ag')
-rw-r--r--benchmarks/bytebench/patches/patch-ag50
1 files changed, 50 insertions, 0 deletions
diff --git a/benchmarks/bytebench/patches/patch-ag b/benchmarks/bytebench/patches/patch-ag
new file mode 100644
index 00000000000..fddceffb51e
--- /dev/null
+++ b/benchmarks/bytebench/patches/patch-ag
@@ -0,0 +1,50 @@
+$NetBSD: patch-ag,v 1.1 2005/10/31 17:09:45 tv Exp $
+
+--- src/fstime.c.orig 1999-07-28 17:47:02.000000000 -0400
++++ src/fstime.c
+@@ -151,11 +151,13 @@ int w_test(void)
+ long f_blocks;
+ extern int sigalarm;
+
++#ifndef __INTERIX
+ /* Sync and let it settle */
+ sync();
+ sleep(2);
+ sync();
+ sleep(1);
++#endif
+
+ signal(SIGALRM,stop_count);
+ sigalarm = 0; /* reset alarm flag */
+@@ -176,6 +178,8 @@ int w_test(void)
+ lseek(f, 0L, 0); /* rewind */
+ }
+
++ fsync(f);
++
+ /* stop clock */
+ fprintf(stderr, "%d second sample\n", seconds);
+ write_score = counted/((long)seconds * COUNTPERK);
+@@ -194,11 +198,13 @@ int r_test(void)
+ extern int sigalarm;
+ extern int errno;
+
++#ifndef __INTERIX
+ /* Sync and let it settle */
+ sync();
+ sleep(2 + seconds/4);
+ sync();
+ sleep(1 + seconds/4);
++#endif
+
+ /* rewind */
+ errno = 0;
+@@ -229,6 +235,8 @@ int r_test(void)
+ counted += COUNTPERBUF;
+ }
+
++ fsync(f);
++
+ /* stop clock */
+ fprintf(stderr, "%d second sample\n", seconds);
+ read_score = counted / ((long)seconds * COUNTPERK);