This bug is found by gentoo ci:
https://bugs.gentoo.org/937325
This happens on gcc-14 because it catches this type of error,
"-Wincompatible-pointer-types".
This doesn't happen on glibc but on musl because the type
declaration of connect/bind is a bit different.
The error message is bellow and the patch is in attachment.
- Qian
x86_64-pc-linux-musl-gcc -Ino/include -g -fPIC -Lno/lib -shared gmp_wrap.c \
-lgmp -o
/var/tmp/portage/sci-mathematics/fricas-1.3.11-r2/work/fricas-1.3.11/target/x86_64-pc-linux-musl/lib/gmp_wrap.so
sockio-c.c: In function 'connect_to_local_server':
sockio-c.c:761:34: error: passing argument 2 of 'connect' from
incompatible pointer type
[-Wincompatible-pointer-types[
https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wincompatible-pointer-types]]
761 | code = connect(sock->socket, uaddr, sizeof(*uaddr));
| ^~~~~
| |
| struct sockaddr_un *
In file included from
/var/tmp/portage/sci-mathematics/fricas-1.3.11-r2/work/fricas-1.3.11/src/include/com.h:42,
from sockio-c.c:48:
/usr/include/sys/socket.h:386:19: note: expected 'const struct sockaddr
*' but argument is of type 'struct sockaddr_un *'
386 | int connect (int, const struct sockaddr *, socklen_t);
| ^~~~~~~~~~~~~~~~~~~~~~~