summaryrefslogtreecommitdiff
path: root/benchmarks/randread/patches
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2010-12-30 08:20:42 +0000
committerobache <obache@pkgsrc.org>2010-12-30 08:20:42 +0000
commitb582e95209e83de5e9d08bcc34c266c0a3c5e427 (patch)
treee43ca0981fe169007dfa7ac95961f6c75e05d076 /benchmarks/randread/patches
parent9bed4accad9fdf5b26d570ba5d999cfcdf002551 (diff)
downloadpkgsrc-b582e95209e83de5e9d08bcc34c266c0a3c5e427.tar.gz
Fixes for DragonFly.
Diffstat (limited to 'benchmarks/randread/patches')
-rw-r--r--benchmarks/randread/patches/patch-ab28
1 files changed, 25 insertions, 3 deletions
diff --git a/benchmarks/randread/patches/patch-ab b/benchmarks/randread/patches/patch-ab
index 150279abd95..c2de3ad0724 100644
--- a/benchmarks/randread/patches/patch-ab
+++ b/benchmarks/randread/patches/patch-ab
@@ -1,12 +1,34 @@
-$NetBSD: patch-ab,v 1.1 2002/08/09 02:01:56 dmcmahill Exp $
+$NetBSD: patch-ab,v 1.2 2010/12/30 08:20:42 obache Exp $
---- randread.c.orig Fri Jun 21 03:11:29 2002
+--- randread.c.orig 2002-06-21 07:11:29.000000000 +0000
+++ randread.c
-@@ -3,6 +3,7 @@
+@@ -3,7 +3,11 @@
* by the author, Curt Sampson <cjs@cynic.net>.
*/
+#include <sys/types.h>
#include <sys/disklabel.h>
++#ifdef __DragonFly__
++#include <sys/disklabel32.h>
++#endif
#include <sys/ioctl.h>
#include <sys/stat.h>
+ #include <sys/time.h>
+@@ -100,9 +104,17 @@ int run_test()
+ */
+ int get_char_device_blocks(int filedes)
+ {
++#ifdef __DragonFly__
++ struct disklabel32 label;
++#else
+ struct disklabel label;
++#endif
+
++#ifdef __DragonFly__
++ if (ioctl(filedes, DIOCGDINFO32, &label) == -1)
++#else
+ if (ioctl(filedes, DIOCGDINFO, &label) == -1)
++#endif
+ return -1;
+
+ /* Hack to make it ignore what this returns. */