Subject: Re: pkg/35219: misc/koffice fails to compile on NetBSD 3.1
To: None <markd@NetBSD.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org,>
From: David H. Gutteridge <dhgutteridge@sympatico.ca>
List: pkgsrc-bugs
Date: 12/10/2006 03:35:04
The following reply was made to PR pkg/35219; it has been noted by GNATS.

From: "David H. Gutteridge" <dhgutteridge@sympatico.ca>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/35219: misc/koffice fails to compile on NetBSD 3.1
Date: Sat, 09 Dec 2006 22:31:40 -0500

 Correction, the earlier "fix" I suggested was a late-night toss-off,
 here's what I used that actually worked.  (As an aside, it looks like
 the round(1) functionality entered the tree some time between 3.99.17
 and 3.99.18, so I used the latter in the check.)
 
 --- KDChartAxesPainter.cpp~	2006-11-17 10:11:38.000000000 -0500
 +++ KDChartAxesPainter.cpp	2006-12-09 18:29:46.000000000 -0500
 @@ -3701,8 +3701,13 @@
      return sVal;
 }
 
 -#if defined ( Q_WS_WIN)
 +#if defined ( Q_WS_WIN) || defined(__DragonFly__)
 #define trunc(x) ((int)(x))
 +#elif defined(__NetBSD__)
 +#include <sys/param.h>
 +#if __NetBSD_Version__ < 399001800
 +#define trunc(x) ((int)(x))
 +#endif
 #endif
 
 QString KDChartAxesPainter::applyLabelsFormat( const double nVal_,