pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

qemu fails to compile on NetBSD 2.0



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



Home | Main Index | Thread Index | Old Index