Fix missing strnlen symbol on Solaris 10 (#19109)

- On Solaris, strnlen was implemented on Solaris 11.
- In Autotools, strnlen can be also checked in Zend scope as
  HAVE_STRNLEN is used only there.
This commit is contained in:
Peter Kokot 2025-07-14 23:07:04 +02:00 committed by GitHub
parent 9121b015c1
commit a4d39f9713
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 2 additions and 2 deletions

View file

@ -149,6 +149,7 @@ AC_CHECK_FUNCS(m4_normalize([
pthread_get_stackaddr_np
pthread_getattr_np
pthread_stackseg_np
strnlen
]))
AC_CHECK_DECL([clock_gettime_nsec_np],

View file

@ -577,7 +577,6 @@ AC_CHECK_FUNCS(m4_normalize([
statvfs
std_syslog
strcasecmp
strnlen
strptime
strtok_r
symlink

View file

@ -266,7 +266,7 @@ PHPAPI int php_glob(const char *pattern, int flags, int (*errfunc)(const char *,
pglob->gl_errfunc = errfunc;
pglob->gl_matchc = 0;
if (strnlen(pattern, PATH_MAX) == PATH_MAX)
if (zend_strnlen(pattern, PATH_MAX) == PATH_MAX)
return(PHP_GLOB_NOMATCH);
if (pglob->gl_offs >= SSIZE_MAX || pglob->gl_pathc >= SSIZE_MAX ||