pkgsrc/devel/sparse/patches/patch-ab
2013-12-28 22:44:23 +00:00

21 lines
541 B
Text

$NetBSD: patch-ab,v 1.3 2013/12/28 22:44:23 bsiegert Exp $
(Very?) old dfly apparently doesn't have strtold. Same for MirBSD.
--- compat/strtold.c.orig 2007-06-12 14:35:09.000000000 +0000
+++ compat/strtold.c
@@ -1,6 +1,14 @@
+#if defined(__DragonFly__)
+#include <sys/param.h>
+#endif
+
#include <stdlib.h>
long double string_to_ld(const char *nptr, char **endptr)
{
+#if (defined(__DragonFly__) && __DragonFly_version < 200000) || defined(__MirBSD__)
+ return strtod(nptr, endptr);
+#else
return strtold(nptr, endptr);
+#endif
}