On Tue, Jan 7, 2014 at 1:43 AM, Matthias Andree <[email protected]> wrote:
> FreeBSD/HEAD fails to build busybox 1.22.0, because busybox's
> strchrnul() declaration is in conflict with FreeBSD's; sources at
> <http://svnweb.freebsd.org/base/head/include/string.h?annotate=246803#l75>.
>
> There is, unfortunately, no exact version tag that you can test against,
> but on FreeBSD, you might use:
>
> // sys/param.h is system-specific
> #include <sys/param.h>
> #if __FreeBSD_version < 1000029
> // declare strchrnul
> #endif
>
> Please fix busybox to not declare strchrnul if the system provides it.

Does attached patch work for you?
diff -d -urpN busybox.4/include/platform.h busybox.5/include/platform.h
--- busybox.4/include/platform.h	2013-12-08 16:22:39.000000000 +0100
+++ busybox.5/include/platform.h	2014-01-07 14:06:43.200500653 +0100
@@ -385,10 +385,6 @@ typedef unsigned smalluint;
 # undef HAVE_STRVERSCMP
 #endif
 
-#if defined(__dietlibc__)
-# undef HAVE_STRCHRNUL
-#endif
-
 #if defined(__WATCOMC__)
 # undef HAVE_DPRINTF
 # undef HAVE_GETLINE
@@ -434,10 +430,21 @@ typedef unsigned smalluint;
 # undef HAVE_UNLOCKED_LINE_OPS
 #endif
 
-#if defined(__FreeBSD__) || defined(__APPLE__)
+#if defined(__dietlibc__)
 # undef HAVE_STRCHRNUL
 #endif
 
+#if defined(__APPLE__)
+# undef HAVE_STRCHRNUL
+#endif
+
+#if defined(__FreeBSD__)
+# include <sys/param.h>
+# if __FreeBSD_version < 1000029
+#  undef HAVE_STRCHRNUL
+# endif
+#endif
+
 #if defined(__NetBSD__)
 # define HAVE_GETLINE 1  /* Recent NetBSD versions have getline() */
 #endif
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to