Bugzilla – Bug 1221006
GCC 14: linux-atm package fails
Last modified: 2024-07-12 11:26:27 UTC
Building linux-atm with GCC 14 fails here: https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:Gcc7/linux-atm/standard/x86_64 Due to (exhaustive list of errors): 100 | fprintf(stderr,"internal error: len %d %% %d\n",req.length, conn.c: In function ‘accept_conn’: conn.c:414:57: error: passing argument 3 of ‘accept’ from incompatible pointer type [-Wincompatible-pointer-types] 414 | fd = accept(conn->fd, (struct sockaddr *)&addr, &len); | ^~~~ | | | size_t * {aka long unsigned int *} In file included from ../../src/include/atm.h:10, from conn.c:42: /usr/include/sys/socket.h:307:42: note: expected ‘socklen_t * restrict’ {aka ‘unsigned int * restrict’} but argument is of type ‘size_t *’ {aka ‘long unsigned int *’} 307 | socklen_t *__restrict __addr_len); | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ See the meta bug#1220571 for more info.
FTR, notes on how Fedora is dealing this should be available here (though the patch there does not seem to fix the pointer incompatibility issue reported here): https://gitlab.com/fweimer-rh/fedora-modernc/-/blob/main/pkg/l/linux-atm.md?ref_type=heads
The include that Fedora adds in their package is already present in our package. The bug is caused by a wrong type being passed to function accept (which IMHO could cause wrong behavior on some big-endian platform), I have created https://build.opensuse.org/request/show/1187046 to address that.