From ce1d1546e17a5f613aad2bdf327a1abb77a32bdb Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Mon, 5 Mar 2018 14:33:51 +0000 Subject: win32: use strchrnul from BusyBox in fnmatch BusyBox ensures that strchrnul is always available, either from the target platform or by including its own version. Therefore it isn't necessary for fnmatch to use its equivalent. --- win32/fnmatch.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/win32/fnmatch.c b/win32/fnmatch.c index add516fb3..de456e526 100644 --- a/win32/fnmatch.c +++ b/win32/fnmatch.c @@ -16,6 +16,8 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include + #if HAVE_CONFIG_H # include #endif @@ -129,7 +131,7 @@ extern int errno; /* This function doesn't exist on most systems. */ -# if !defined HAVE___STRCHRNUL && !defined _LIBC +# if !defined HAVE___STRCHRNUL && !defined _LIBC && 0 static char * __strchrnul (const char *s, int c) { @@ -138,6 +140,8 @@ __strchrnul (const char *s, int c) result = strchr (s, '\0'); return result; } +# else +# define __strchrnul strchrnul # endif # ifndef internal_function -- cgit v1.2.3-55-g6feb