diff options
Diffstat (limited to 'emulators/qemu/patches/patch-av')
-rw-r--r-- | emulators/qemu/patches/patch-av | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/emulators/qemu/patches/patch-av b/emulators/qemu/patches/patch-av new file mode 100644 index 00000000000..e084c729c30 --- /dev/null +++ b/emulators/qemu/patches/patch-av @@ -0,0 +1,27 @@ +$NetBSD: patch-av,v 1.3 2007/10/07 21:21:00 heinz Exp $ + + Provide trunc() implementation for NetBSD 3 and Dragonfly + +--- fpu/softfloat-native.c.orig 2007-02-06 00:01:54.000000000 +0100 ++++ fpu/softfloat-native.c +@@ -3,6 +3,20 @@ + #include "softfloat.h" + #include <math.h> + ++#if defined(__DragonFly__) || defined(__NetBSD__) ++# include <sys/param.h> ++#endif ++ ++#if (defined(__DragonFly__) && __DragonFly_version < 195000) || (defined(__NetBSD__) && __NetBSD_Version__ <= 399001700) ++static double trunc( double val ) ++{ ++ if (val > 0) ++ return floor(val); ++ else ++ return ceil(val); ++} ++#endif ++ + void set_float_rounding_mode(int val STATUS_PARAM) + { + STATUS(float_rounding_mode) = val; |