Skip to content

Commit 2b7d5ed

Browse files
committed
Merge branch 'PHP-8.0'
* PHP-8.0: sockets: Fix variable/macro name collision on AIX
2 parents 7db29d2 + e074e02 commit 2b7d5ed

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ext/sockets/sendrecvmsg.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,9 @@ PHP_FUNCTION(socket_cmsg_space)
295295
}
296296

297297
if (entry->var_el_size > 0) {
298-
size_t rem_size = ZEND_LONG_MAX - entry->size;
299-
size_t n_max = rem_size / entry->var_el_size;
298+
/* Leading underscore to avoid symbol collision on AIX. */
299+
size_t _rem_size = ZEND_LONG_MAX - entry->size;
300+
size_t n_max = _rem_size / entry->var_el_size;
300301
size_t size = entry->size + n * entry->var_el_size;
301302
size_t total_size = CMSG_SPACE(size);
302303
if (n > n_max /* zend_long overflow */

0 commit comments

Comments
 (0)