commit:     117b0ab1e8ff0ec37b020b393402c37604ce95c5
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 30 20:57:18 2025 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Nov 30 20:57:18 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=117b0ab1

sys-block/buffer: fix c23 pointer declarations

Closes: https://bugs.gentoo.org/607752
Closes: https://bugs.gentoo.org/829708
Closes: https://bugs.gentoo.org/898558
Closes: https://bugs.gentoo.org/944421
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 sys-block/buffer/Manifest                          |  2 +-
 ...buffer-1.19-r4.ebuild => buffer-1.19-r5.ebuild} |  8 ++++--
 .../buffer/files/buffer-1.19-posix-semun.patch     | 32 ++++++++++++++++++++++
 3 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/sys-block/buffer/Manifest b/sys-block/buffer/Manifest
index fd4a286b240d..7bf8c2bb0bad 100644
--- a/sys-block/buffer/Manifest
+++ b/sys-block/buffer/Manifest
@@ -1,2 +1,2 @@
-DIST buffer_1.19-12.debian.tar.xz 9924 BLAKE2B 
9f6591e00d596257956e3230cbdf8e58392aa3666d7900c30ea26d103f03d25071ff1033fa72e7be799021ed4c32d43e0e5ad69d1457a5ee22c33e3ae6f8c058
 SHA512 
3bc9d8c281268d38c1cc3ac40727d747c91b605fc3128e285d24663f97396292a0ec40ede9205702793b5d090c4e172b0df28321921b000aa0fdcb2660319367
+DIST buffer_1.19-12.1.debian.tar.xz 11736 BLAKE2B 
ae301818c10dade9850b56dce700d26d4c488afdb8ea32aba7768f12d72f661ef7456da1c07b4df8b762c06969b3d41fe620ef047300702dda0620cf3f0ee68c
 SHA512 
c5821b07729b0814799ef7a06dbf67ed4d5d4b7e22ede3fd7a6aeb236366faff6b2457e84f175e8138d8b63a319df7e3845c8370f2a5810aa405b0175c252547
 DIST buffer_1.19.orig.tar.gz 17753 BLAKE2B 
68e2026f29cb00c48c8f3638d97adeeee0d194d7a6db96cbded251b3f97d36ba2ac32a60660df8aa1d2c7b79dd774b543d3a460a5d76ab6ca408606a013b5648
 SHA512 
b724d8c3e21f29890659c95a61db8667846e49614455411995160bc8d5af8a37af91465ad5d882e6bd7883dbd7886215a8c1d530f7392c98cdcead4f4377aa7f

diff --git a/sys-block/buffer/buffer-1.19-r4.ebuild 
b/sys-block/buffer/buffer-1.19-r5.ebuild
similarity index 90%
rename from sys-block/buffer/buffer-1.19-r4.ebuild
rename to sys-block/buffer/buffer-1.19-r5.ebuild
index 5397809b161d..1aca5a7f1899 100644
--- a/sys-block/buffer/buffer-1.19-r4.ebuild
+++ b/sys-block/buffer/buffer-1.19-r5.ebuild
@@ -1,16 +1,17 @@
 # Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 inherit flag-o-matic toolchain-funcs
 
 DESCRIPTION="A tapedrive tool for speeding up reading from and writing to tape"
-HOMEPAGE="http://www.microwerks.net/~hugo/";
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage";
 
-DEBIAN_PR=12
+DEBIAN_PR=12.1
 DEBIAN_P="${PN}_${PV}"
 DEBIAN_PATCH="${PN}_${PV}-${DEBIAN_PR}.debian.tar.xz"
+
 # We do NOT rename the Debian .orig.tar.gz file at this point
 # Because Gentoo shipped a very slightly DIFFERENT buffer-1.19.tgz than Debian!
 # Enough to make the debian patchset not apply directly. Debian patchset
@@ -31,6 +32,7 @@ src_prepare() {
                einfo ${p}
                eapply -p1 "${p}" || die
        done
+       eapply "${FILESDIR}"/${P}-posix-semun.patch
 
        cd "${S}" || die
        emake clean

diff --git a/sys-block/buffer/files/buffer-1.19-posix-semun.patch 
b/sys-block/buffer/files/buffer-1.19-posix-semun.patch
new file mode 100644
index 000000000000..34ef13f07608
--- /dev/null
+++ b/sys-block/buffer/files/buffer-1.19-posix-semun.patch
@@ -0,0 +1,32 @@
+--- a/sem.c
++++ b/sem.c
+@@ -35,28 +35,12 @@
+ #include <errno.h>
+ #include "sem.h"
+ 
+-/* If we've got a version of glibc that doesn't define union semun, we do
+- * it ourseleves like in semctl(2). Otherwise, fall back to the original
+- * buffer behaviour of defining it (differetly!) only on some systems.
+- *
+- * [email protected], 1999/08/29
+- */
+-#if defined(__GNU_LIBRARY__) && defined(_SEM_SEMUN_UNDEFINED)
++// modern POSIX requires the user to provide this definition
+ union semun {
+       int val;                        /* value for SETVAL              */
+       struct semid_ds *buf;           /* buffer for IPC_STAT & IPC_SET */
+       unsigned short int *array;      /* array for GETALL & SETALL     */
+-      struct seminfo *__buf;          /* buffer for IPC_INFO           */
+ };
+-#else
+-#if defined(SYS5) || defined(ultrix) || defined(_AIX)
+-union semun {
+-      int val;
+-      struct semid_ds *buf;
+-      ushort *array;
+-};
+-#endif
+-#endif
+ 
+ /* IMPORTS */
+ 

Reply via email to