Fix build on SunOS.

This commit is contained in:
fhajny 2015-02-08 20:40:51 +00:00
parent 3a9005f317
commit 9a4079fb82
2 changed files with 19 additions and 1 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.13 2014/12/12 06:45:34 mef Exp $
$NetBSD: distinfo,v 1.14 2015/02/08 20:40:51 fhajny Exp $
SHA1 (dbench-4.0.tar.gz) = 34492fa9d9686052e9b85bd3deedc2bbf6cef626
RMD160 (dbench-4.0.tar.gz) = bff2f721eb47868a1e34d4d4691817f0a6f037d8
@ -6,3 +6,4 @@ Size (dbench-4.0.tar.gz) = 2055359 bytes
SHA1 (patch-aa) = 3e523784ef4d1f2a3d4bd94ee22b29c604e3721a
SHA1 (patch-ab) = 83e77ea062793e29a0417c1473214e617799c1c1
SHA1 (patch-ac) = 2f1990b22f047d6b66521c4a25f5aeddc6aa24f8
SHA1 (patch-dbench.h) = 7c217dc7d4f8cce6b4fa9bb4c4f117a0ec1f6e33

View file

@ -0,0 +1,17 @@
$NetBSD: patch-dbench.h,v 1.1 2015/02/08 20:40:51 fhajny Exp $
Fix build on SunOS. Taken from bundled snprintf.c.
--- dbench.h.orig 2008-02-18 00:49:35.000000000 +0000
+++ dbench.h
@@ -92,6 +92,10 @@
#define False 0
#define uint32 unsigned
+#ifdef __sun
+#define MAX(p,q) (((p) >= (q)) ? (p) : (q))
+#endif
+
struct op {
unsigned count;
double total_time;