Subject: qemu fails to compile on NetBSD 2.0
To: None <pkgsrc-users@netbsd.org>
From: Stephen Borrill <netbsd@precedence.co.uk>
List: pkgsrc-users
Date: 09/07/2006 21:12:06
emulators/qemu doesn't compile on NetBSD 2.0 because of missing lrintf and
llrintf in libm. Here's a quick patch, but probably not ideal (the qemu
configure script really ought to check for the functions' existence). The
patch also has the side effect that we use libm lrint() and llrint() on
3.0 and later.
--- fpu/softfloat-native.c.orig 2006-05-03 21:32:58.000000000 +0100
+++ fpu/softfloat-native.c 2006-09-07 21:07:24.000000000 +0100
@@ -22,9 +22,11 @@
}
#endif
-#if defined(_BSD)
+#if !(__NetBSD_Version__ > 300000000)
#define lrint(d) ((long)rint(d))
#define llrint(d) ((long long)rint(d))
+#define lrintf(d) ((long)rintf(d))
+#define llrintf(d) ((long long)rintf(d))
#endif
#if defined(__powerpc__)
--
Stephen