Recent DragonFly have trunc().

Patch provided by Hasso Tepper in PR 38867.
This commit is contained in:
obache 2008-07-02 13:35:16 +00:00
parent b2cf461775
commit 48bbbbf949
2 changed files with 8 additions and 8 deletions

View file

@ -1,6 +1,6 @@
$NetBSD: distinfo,v 1.5 2008/01/14 23:17:27 wiz Exp $
$NetBSD: distinfo,v 1.6 2008/07/02 13:35:16 obache Exp $
SHA1 (libkexiv2-0.1.6.tar.bz2) = 725a718df0f87e8af5e8e37cbfff9cf198ef6243
RMD160 (libkexiv2-0.1.6.tar.bz2) = e2fe84bf8072aa8056f226d1b394897060862f17
Size (libkexiv2-0.1.6.tar.bz2) = 428456 bytes
SHA1 (patch-aa) = 6406f5960bd55a82558245c7bc3c4aa48d4c946e
SHA1 (patch-aa) = 2ef57cb05bfa53d566bef390407fca0bef057b22

View file

@ -1,16 +1,16 @@
$NetBSD: patch-aa,v 1.4 2008/01/14 23:17:27 wiz Exp $
$NetBSD: patch-aa,v 1.5 2008/07/02 13:35:16 obache Exp $
--- libkexiv2/libkexiv2/kexiv2.cpp.orig 2007-05-08 15:02:40.000000000 +0000
+++ libkexiv2/libkexiv2/kexiv2.cpp
@@ -60,6 +60,20 @@
--- libkexiv2/libkexiv2/kexiv2.cpp.orig 2007-09-08 02:21:16 +0300
+++ libkexiv2/libkexiv2/kexiv2.cpp 2008-06-05 14:45:19 +0300
@@ -79,6 +79,20 @@
#include "kexiv2.h"
+#if defined(__NetBSD__)
+#if defined(__NetBSD__) || defined(__DragonFly__)
+#include <sys/param.h>
+#endif
+
+#if defined(__DragonFly__) || (defined(__NetBSD__) && __NetBSD_Version__ <= 399001700)
+#if (defined(__DragonFly__) && __DragonFly_version < 190000) || (defined(__NetBSD__) && __NetBSD_Version__ <= 399001700)
+static double trunc(double val)
+{
+ if (val > 0)