Skip to content

Commit 338f9ca

Browse files
committed
Check for reallocarray
Ideally temporary until phpGH-17433.
1 parent 0280256 commit 338f9ca

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,7 @@ AC_CHECK_FUNCS(m4_normalize([
571571
poll
572572
pthread_jit_write_protect_np
573573
putenv
574+
reallocarray
574575
scandir
575576
setenv
576577
setitimer

main/php_glob.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ struct glob_path_stat {
172172
zend_stat_t *gps_stat;
173173
};
174174

175+
#ifndef HAVE_REALLOCARRAY
175176
/*
176177
* XXX: This is temporary to avoid having reallocarray be imported and part of
177178
* PHP's public API. Since it's only needed here and on Windows, we can just
@@ -212,6 +213,7 @@ reallocarray(void *optr, size_t nmemb, size_t size)
212213
}
213214
return realloc(optr, size * nmemb);
214215
}
216+
#endif
215217

216218
static int compare(const void *, const void *);
217219
static int compare_gps(const void *, const void *);

0 commit comments

Comments
 (0)