summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-misc/ttyrec/files/ttyrec-1.0.8-glibc-2.30.patch')
-rw-r--r--app-misc/ttyrec/files/ttyrec-1.0.8-glibc-2.30.patch67
1 files changed, 67 insertions, 0 deletions
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 000000000000..79a024ac734b
--- /dev/null
+++ b/app-misc/ttyrec/files/ttyrec-1.0.8-glibc-2.30.patch
@@ -0,0 +1,67 @@
+--- a/io.h
++++ b/io.h
+@@ -9,5 +9,6 @@
+ int edup (int oldfd);
+ int edup2 (int oldfd, int newfd);
+ FILE* efdopen (int fd, const char *mode);
++void set_progname (const char *name);
+
+ #endif
+--- a/ttyrec.c
++++ b/ttyrec.c
+@@ -42,13 +42,19 @@
+ /*
+ * script
+ */
++
++#ifndef _GNU_SOURCE
++#define _GNU_SOURCE
++#endif
++
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <termios.h>
+ #include <sys/ioctl.h>
+ #include <sys/time.h>
+ #include <sys/file.h>
+-#include <sys/signal.h>
++#include <sys/wait.h>
++#include <signal.h>
+ #include <stdio.h>
+ #include <time.h>
+ #include <unistd.h>
+@@ -57,7 +63,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>
+@@ -341,7 +349,7 @@
+ rtt = tt;
+ #if defined(SVR4)
+ rtt.c_iflag = 0;
+- rtt.c_lflag &= ~(ISIG|ICANON|XCASE|ECHO|ECHOE|ECHOK|ECHONL);
++ rtt.c_lflag &= ~(ISIG|ICANON|ECHO|ECHOE|ECHOK|ECHONL);
+ rtt.c_oflag = OPOST;
+ rtt.c_cc[VINTR] = CDEL;
+ rtt.c_cc[VQUIT] = CDEL;
+@@ -449,6 +457,7 @@
+ 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 +475,7 @@
+ #endif
+ (void) ioctl(0, TIOCGWINSZ, (char *)&win);
+ }
++#endif
+ #else /* !SVR4 */
+ #ifndef HAVE_openpty
+ line[strlen("/dev/")] = 't';