app-misc/ttyrec: fix building with glibc 2.30.
authorStephan Hartmann <stha09@googlemail.com>
Tue, 18 Feb 2020 15:11:39 +0000 (16:11 +0100)
committerPatrice Clement <monsieurp@gentoo.org>
Mon, 9 Mar 2020 20:33:36 +0000 (21:33 +0100)
Closes: https://bugs.gentoo.org/691908
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Stephan Hartmann <stha09@googlemail.com>
Closes: https://github.com/gentoo/gentoo/pull/14692
Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
app-misc/ttyrec/files/ttyrec-1.0.8-glibc-2.30.patch [new file with mode: 0644]
app-misc/ttyrec/ttyrec-1.0.8-r2.ebuild

diff --git a/app-misc/ttyrec/files/ttyrec-1.0.8-glibc-2.30.patch b/app-misc/ttyrec/files/ttyrec-1.0.8-glibc-2.30.patch
new file mode 100644 (file)
index 0000000..174fc77
--- /dev/null
@@ -0,0 +1,30 @@
+diff --git a/ttyrec.c b/ttyrec.c
+index 3392f70..86a59ee 100644
+--- a/ttyrec.c
++++ b/ttyrec.c
+@@ -57,7 +57,9 @@
+ #if defined(SVR4)
+ #include <fcntl.h>
++#if !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) || defined(__linux__))
+ #include <stropts.h>
++#endif
+ #endif /* SVR4 */
+ #include <sys/time.h>
+@@ -449,6 +451,7 @@ getslave()
+               perror("open(fd, O_RDWR)");
+               fail();
+       }
++#ifndef __linux__
+       if (isastream(slave)) {
+               if (ioctl(slave, I_PUSH, "ptem") < 0) {
+                       perror("ioctl(fd, I_PUSH, ptem)");
+@@ -466,6 +469,7 @@ getslave()
+ #endif
+               (void) ioctl(0, TIOCGWINSZ, (char *)&win);
+       }
++#endif
+ #else /* !SVR4 */
+ #ifndef HAVE_openpty
+       line[strlen("/dev/")] = 't';
index df5351688d2eefa0e07c89fc52b8f767e8f3e76d..e3f42c0d0d33a3b5d530a551179423f8369078b4 100644 (file)
@@ -12,7 +12,10 @@ SRC_URI="http://0xcc.net/ttyrec/${P}.tar.gz"
 LICENSE="BSD"
 SLOT="0"
 KEYWORDS="~alpha amd64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
-PATCHES=( "${FILESDIR}/${P}-flags.patch" )
+PATCHES=(
+       "${FILESDIR}/${P}-flags.patch"
+       "${FILESDIR}/${P}-glibc-2.30.patch"
+)
 
 src_compile() {
        # Bug 106530