commit: c70aa96384207367b8a6d876b574c64021da4b67 Author: Cristian Othón Martínez Vera <cfuga <AT> cfuga <DOT> mx> AuthorDate: Wed Feb 5 23:00:41 2025 +0000 Commit: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org> CommitDate: Sat Feb 8 11:20:45 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c70aa963
net-misc/nx: fix compilation with gcc14 (access.c) Backport from XOrg. This PR also fixes a small URL typo from my previous patch ;-) Link: https://gitlab.freedesktop.org/xorg/xserver/-/commit/0ddcd8785199c08d9bded3c767a3b1227c670999 Closes: https://bugs.gentoo.org/934131 Signed-off-by: Cristian Othón Martínez Vera <cfuga <AT> cfuga.mx> Closes: https://github.com/gentoo/gentoo/pull/40458 Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org> net-misc/nx/files/nx-3.5.99.26-gcc14-access.patch | 28 +++++++++++++++++++++++ net-misc/nx/nx-3.5.99.26.ebuild | 3 ++- net-misc/nx/nx-3.5.99.27.ebuild | 1 + 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/net-misc/nx/files/nx-3.5.99.26-gcc14-access.patch b/net-misc/nx/files/nx-3.5.99.26-gcc14-access.patch new file mode 100644 index 000000000000..44afd9232434 --- /dev/null +++ b/net-misc/nx/files/nx-3.5.99.26-gcc14-access.patch @@ -0,0 +1,28 @@ +Bugs: https://bugs.gentoo.org/934131 +https://gitlab.freedesktop.org/xorg/xserver/-/commit/0ddcd8785199c08d9bded3c767a3b1227c670999 + +Backport from XOrg server: + + commit 0ddcd8785199c08d9bded3c767a3b1227c670999 + Author: Joaquim Monteiro <joaquim.monte...@protonmail.com> + Date: Sun, 23 Jun 2024 21:17:25 +0100 + + [PATCH 1/2] os: Fix assignment with incompatible pointer type + + struct hostent->h_addr_list is of type char**, not const char**. + GCC considers this an error when in C99 mode or later. + + Signed-off-by: Joaquim Monteiro <joaquim.monte...@protonmail.com> + Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1572> + +--- a/nx-X11/programs/Xserver/os/access.c ++++ b/nx-X11/programs/Xserver/os/access.c +@@ -1941,7 +1941,7 @@ + char hostname[SI_HOSTNAME_MAXLEN]; + int f, hostaddrlen; + void * hostaddr; +- const char **addrlist; ++ char **addrlist; + + if (siAddrLen >= sizeof(hostname)) + return FALSE; diff --git a/net-misc/nx/nx-3.5.99.26.ebuild b/net-misc/nx/nx-3.5.99.26.ebuild index c08c5941821d..437f6f51c202 100644 --- a/net-misc/nx/nx-3.5.99.26.ebuild +++ b/net-misc/nx/nx-3.5.99.26.ebuild @@ -50,8 +50,9 @@ PATCHES=( "${FILESDIR}/${PN}-3.5.99.26-riscv64-support.patch" "${FILESDIR}/${PN}-3.5.99.26-musl.patch" "${FILESDIR}/${PN}-3.5.99.26-which.patch" - # https://github.com/ArticaProject/nx-libs/pull/1087 + # https://github.com/ArcticaProject/nx-libs/pull/1087 "${FILESDIR}/${PN}-3.5.99.26-gcc14-32bit.patch" + "${FILESDIR}/${PN}-3.5.99.26-gcc14-access.patch" ) src_prepare() { diff --git a/net-misc/nx/nx-3.5.99.27.ebuild b/net-misc/nx/nx-3.5.99.27.ebuild index 095b3d048849..9df06029d9a7 100644 --- a/net-misc/nx/nx-3.5.99.27.ebuild +++ b/net-misc/nx/nx-3.5.99.27.ebuild @@ -46,6 +46,7 @@ PATCHES=( "${FILESDIR}/${PN}-3.5.99.27-which.patch" # https://github.com/ArcticaProject/nx-libs/pull/1087 "${FILESDIR}/${PN}-3.5.99.26-gcc14-32bit.patch" + "${FILESDIR}/${PN}-3.5.99.26-gcc14-access.patch" ) src_prepare() {