From: Denys Vlasenko Date: Tue, 7 Jan 2014 13:09:47 +0000 (+0100) Subject: platform.h: undef HAVE_STRCHRNUL only on correct versions of FreeBSD X-Git-Tag: 1_23_0~239 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=432fbd7a1a71ab5a91a8cfab57fad74fda9389bb;p=oweals%2Fbusybox.git platform.h: undef HAVE_STRCHRNUL only on correct versions of FreeBSD Signed-off-by: Denys Vlasenko --- diff --git a/include/platform.h b/include/platform.h index cfc802907..2899a9093 100644 --- a/include/platform.h +++ b/include/platform.h @@ -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 +# if __FreeBSD_version < 1000029 +# undef HAVE_STRCHRNUL +# endif +#endif + #if defined(__NetBSD__) # define HAVE_GETLINE 1 /* Recent NetBSD versions have getline() */ #endif