commit:     ab51e719f086daa2684c155321b4359f97f7b5ba
Author:     Stephan Hartmann <stha09 <AT> googlemail <DOT> com>
AuthorDate: Tue Feb 18 15:11:39 2020 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Mon Mar  9 20:33:36 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab51e719

app-misc/ttyrec: fix building with glibc 2.30.

Closes: https://bugs.gentoo.org/691908
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Stephan Hartmann <stha09 <AT> googlemail.com>
Closes: https://github.com/gentoo/gentoo/pull/14692
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>

 .../ttyrec/files/ttyrec-1.0.8-glibc-2.30.patch     | 30 ++++++++++++++++++++++
 app-misc/ttyrec/ttyrec-1.0.8-r2.ebuild             |  5 +++-
 2 files changed, 34 insertions(+), 1 deletion(-)

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
index 00000000000..174fc7786e1
--- /dev/null
+++ b/app-misc/ttyrec/files/ttyrec-1.0.8-glibc-2.30.patch
@@ -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';

diff --git a/app-misc/ttyrec/ttyrec-1.0.8-r2.ebuild 
b/app-misc/ttyrec/ttyrec-1.0.8-r2.ebuild
index df5351688d2..e3f42c0d0d3 100644
--- a/app-misc/ttyrec/ttyrec-1.0.8-r2.ebuild
+++ b/app-misc/ttyrec/ttyrec-1.0.8-r2.ebuild
@@ -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

Reply via email to