Skip to content

Commit a4d39f9

Browse files
authored
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.
1 parent 9121b01 commit a4d39f9

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

Zend/Zend.m4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ AC_CHECK_FUNCS(m4_normalize([
149149
pthread_get_stackaddr_np
150150
pthread_getattr_np
151151
pthread_stackseg_np
152+
strnlen
152153
]))
153154
154155
AC_CHECK_DECL([clock_gettime_nsec_np],

configure.ac

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,6 @@ AC_CHECK_FUNCS(m4_normalize([
577577
statvfs
578578
std_syslog
579579
strcasecmp
580-
strnlen
581580
strptime
582581
strtok_r
583582
symlink

main/php_glob.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ PHPAPI int php_glob(const char *pattern, int flags, int (*errfunc)(const char *,
266266
pglob->gl_errfunc = errfunc;
267267
pglob->gl_matchc = 0;
268268

269-
if (strnlen(pattern, PATH_MAX) == PATH_MAX)
269+
if (zend_strnlen(pattern, PATH_MAX) == PATH_MAX)
270270
return(PHP_GLOB_NOMATCH);
271271

272272
if (pglob->gl_offs >= SSIZE_MAX || pglob->gl_pathc >= SSIZE_MAX ||

0 commit comments

Comments
 (0)