[php-src] Issue #7983: Ext sockets fails to build in php:8.1.2 docker image
| From: | OneEyedSpaceFish | Date: | Fri, 21 Jan 2022 23:25:54 +0000 |
| Subject: | [php-src] Issue #7983: Ext sockets fails to build in php:8.1.2 docker image | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-239189@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/7983
Author: OneEyedSpaceFish
### Description
The following docker build:
```Dockerfile
FROM php:8.1.2-cli
RUN docker-php-ext-install sockets
```
Resulted in this build failure:
```
/usr/src/php/ext/sockets/sendrecvmsg.c: In function 'init_ancillary_registry':
/usr/src/php/ext/sockets/sendrecvmsg.c:128:19: error: invalid application of 'sizeof' to
incomplete type 'struct cmsgcred'
128 | PUT_ENTRY(sizeof(struct cmsgcred), 0, 0, from_zval_write_ucred,
| ^~~~~~
/usr/src/php/ext/sockets/sendrecvmsg.c:99:17: note: in definition of macro 'PUT_ENTRY'
99 | entry.size = sizev; \
| ^~~~~
/usr/src/php/ext/sockets/sendrecvmsg.c:129:36: error: 'SCM_CREDS' undeclared (first use in
this function)
129 | to_zval_read_ucred, SOL_SOCKET, SCM_CREDS);
| ^~~~~~~~~
/usr/src/php/ext/sockets/sendrecvmsg.c:105:19: note: in definition of macro 'PUT_ENTRY'
105 | key.cmsg_type = type; \
| ^~~~
/usr/src/php/ext/sockets/sendrecvmsg.c:129:36: note: each undeclared identifier is reported only
once for each function it appears in
129 | to_zval_read_ucred, SOL_SOCKET, SCM_CREDS);
| ^~~~~~~~~
/usr/src/php/ext/sockets/sendrecvmsg.c:105:19: note: in definition of macro 'PUT_ENTRY'
105 | key.cmsg_type = type; \
| ^~~~
make: *** [Makefile:213: sendrecvmsg.lo] Error 1
```
This issue seemingly introduced with the 8.1.2 docker image release, and all (including the latest
build of 8.1.1 seems fine)
### PHP Version
8.1.2
### Operating System
php:8.1.2-cli@sha256:9e7ab0daaea86938ac6d32db046059856cfbfc54007ad404d4ee7210ab432dc3