Use AC_REPLACE_FUNCS
strndup is removed from AC_CHECK_FUNCS since it will be provided if not found. Fixes #2610
This commit is contained in:
@ -10,8 +10,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined(__APPLE__)
|
||||
|
||||
#ifndef HAVE_strndup
|
||||
/*
|
||||
* Taken from FreeBSD
|
||||
* Returns a pointer to a new string which is a duplicate of the
|
||||
@ -30,5 +29,4 @@ char *strndup(const char *str, size_t n) {
|
||||
copy[len] = '\0';
|
||||
return (copy);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user