commit:     7509eb9a2f072b029ce31220cbe6de9e4aba3613
Author:     Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Thu Aug 14 22:00:59 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Aug 15 22:32:17 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7509eb9a

app-emulation/ski: fix glibc-2.42 - termio

remove occurences of termio.h and "struct termio"

Closes: https://bugs.gentoo.org/961423
Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr>
Part-of: https://github.com/gentoo/gentoo/pull/43451
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/ski/files/ski-1.5.0-fix_termio.patch | 49 ++++++++++++++++++++++
 app-emulation/ski/ski-1.5.0.ebuild                 |  5 +++
 2 files changed, 54 insertions(+)

diff --git a/app-emulation/ski/files/ski-1.5.0-fix_termio.patch 
b/app-emulation/ski/files/ski-1.5.0-fix_termio.patch
new file mode 100644
index 000000000000..d1a5b5850ef6
--- /dev/null
+++ b/app-emulation/ski/files/ski-1.5.0-fix_termio.patch
@@ -0,0 +1,49 @@
+PRs merged
+https://github.com/trofi/ski/pull/17.patch
+https://github.com/trofi/ski/pull/18.patch
+Remove occurrences of termio.h and struct termio. Bug #961423
+--- a/src/dos.c
++++ b/src/dos.c
+@@ -35,13 +35,10 @@
+ #include <sys/stat.h>
+ #include <signal.h>
+ #include <string.h>
+-#if defined(__FreeBSD__)
+ #include <termios.h>
+-#define termio  termios
++#if defined(__FreeBSD__)
+ #define TCGETA  TIOCGETA
+ #define TCSETA  TIOCSETA
+-#else
+-#include <termio.h>
+ #endif
+ #include <time.h>
+ #if defined __linux__
+@@ -140,7 +137,7 @@ Status dosInt21(BYTE func, BYTE subFunc)
+       break;
+     case 0x08:                                /* read keyboard without echo */
+       if (isatty(fhmap[0])) {
+-          struct termio origTermio, newTermio;
++          struct termios origTermio, newTermio;
+ 
+           (void)ioctl(fhmap[0], TCGETA, &origTermio);
+           newTermio = origTermio;
+--- a/src/linux/syscall-linux.c
++++ b/src/linux/syscall-linux.c
+@@ -2147,14 +2147,14 @@ doSyscall (HWORD num, REG arg0, REG arg1, REG arg2, 
REG arg3, REG arg4,
+ 
+       case TCGETA:
+         /* assumes host OS matches Linux/ia64 */
+-        bytes_out = sizeof (struct termio);
++        bytes_out = sizeof (struct termios);
+         break;
+ 
+       case TCSETA:
+       case TCSETAW:
+       case TCSETAF:
+         /* assumes host OS matches Linux/ia64 */
+-        bytes_in = sizeof (struct termio);
++        bytes_in = sizeof (struct termios);
+         break;
+ 
+       case TIOCGPGRP:

diff --git a/app-emulation/ski/ski-1.5.0.ebuild 
b/app-emulation/ski/ski-1.5.0.ebuild
index 64cb3ed2767e..1e16ff19a53c 100644
--- a/app-emulation/ski/ski-1.5.0.ebuild
+++ b/app-emulation/ski/ski-1.5.0.ebuild
@@ -24,6 +24,11 @@ DEPEND="
        dev-util/gperf
 "
 
+PATCHES=(
+       # merged, to be removed for the next version
+       "${FILESDIR}"/${P}-fix_termio.patch
+)
+
 src_configure() {
        local myeconfargs=(
                $(use_with debug bfd)

Reply via email to