commit:     57047cf6149703d105c3b14065573b97bc30152c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Oct  1 19:57:29 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Oct  1 19:57:29 2025 +0000
URL:        
https://gitweb.gentoo.org/proj/toolchain/linux-headers-patches.git/commit/?id=57047cf6

6.16: add termio patches for alpha/sparc/parisc

Bug: https://bugs.gentoo.org/961769
Bug: https://bugs.gentoo.org/962600
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...-reference-obsolete-termio-struct-for-TC-.patch | 46 ++++++++++++++++++++++
 ...-reference-obsolete-termio-struct-for-TC-.patch | 46 ++++++++++++++++++++++
 ...t-reference-obsolete-termio-struct-for-TC.patch | 44 +++++++++++++++++++++
 3 files changed, 136 insertions(+)

diff --git 
a/6.16/00_all-0004-alpha-don-t-reference-obsolete-termio-struct-for-TC-.patch 
b/6.16/00_all-0004-alpha-don-t-reference-obsolete-termio-struct-for-TC-.patch
new file mode 100644
index 0000000..d5a5e1f
--- /dev/null
+++ 
b/6.16/00_all-0004-alpha-don-t-reference-obsolete-termio-struct-for-TC-.patch
@@ -0,0 +1,46 @@
+From b6a724419773598d75ace5629bf4b05726d45218 Mon Sep 17 00:00:00 2001
+Message-ID: 
<b6a724419773598d75ace5629bf4b05726d45218.1759348574.git....@gentoo.org>
+In-Reply-To: 
<fc2e8775d55f43e08eb79d326d6fdd89291898dd.1759348574.git....@gentoo.org>
+References: 
<fc2e8775d55f43e08eb79d326d6fdd89291898dd.1759348574.git....@gentoo.org>
+From: Sam James <[email protected]>
+Date: Wed, 1 Oct 2025 20:37:40 +0100
+Subject: [PATCH 2/3] alpha: don't reference obsolete termio struct for TC*
+ constants
+
+Similar in nature to ab107276607af90b13a5994997e19b7b9731e251. glibc-2.42
+drops the legacy termio struct, but the ioctls.h header still defines some
+TC* constants in terms of termio (via sizeof). Hardcode the values instead.
+
+This fixes building Python for example, which falls over like:
+  ./Modules/termios.c:1119:16: error: invalid application of 'sizeof' to 
incomplete type 'struct termio'
+
+Link: https://bugs.gentoo.org/961769
+Link: https://bugs.gentoo.org/962600
+Co-authored-by: Stian Halseth <[email protected]>
+Signed-off-by: Sam James <[email protected]>
+---
+ arch/alpha/include/uapi/asm/ioctls.h | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/arch/alpha/include/uapi/asm/ioctls.h 
b/arch/alpha/include/uapi/asm/ioctls.h
+index 971311605288f..857e280f95d1e 100644
+--- a/arch/alpha/include/uapi/asm/ioctls.h
++++ b/arch/alpha/include/uapi/asm/ioctls.h
+@@ -23,10 +23,10 @@
+ #define TCSETSW               _IOW('t', 21, struct termios)
+ #define TCSETSF               _IOW('t', 22, struct termios)
+ 
+-#define TCGETA                _IOR('t', 23, struct termio)
+-#define TCSETA                _IOW('t', 24, struct termio)
+-#define TCSETAW               _IOW('t', 25, struct termio)
+-#define TCSETAF               _IOW('t', 28, struct termio)
++#define TCGETA          0x5405
++#define TCSETA          0x5406
++#define TCSETAW         0x5407
++#define TCSETAF         0x5408
+ 
+ #define TCSBRK                _IO('t', 29)
+ #define TCXONC                _IO('t', 30)
+-- 
+2.51.0
+

diff --git 
a/6.16/00_all-0005-sparc-don-t-reference-obsolete-termio-struct-for-TC-.patch 
b/6.16/00_all-0005-sparc-don-t-reference-obsolete-termio-struct-for-TC-.patch
new file mode 100644
index 0000000..c89b944
--- /dev/null
+++ 
b/6.16/00_all-0005-sparc-don-t-reference-obsolete-termio-struct-for-TC-.patch
@@ -0,0 +1,46 @@
+From 3ffe89f049619167c17e2359ce9d8ea9270b76eb Mon Sep 17 00:00:00 2001
+Message-ID: 
<3ffe89f049619167c17e2359ce9d8ea9270b76eb.1759348574.git....@gentoo.org>
+In-Reply-To: 
<fc2e8775d55f43e08eb79d326d6fdd89291898dd.1759348574.git....@gentoo.org>
+References: 
<fc2e8775d55f43e08eb79d326d6fdd89291898dd.1759348574.git....@gentoo.org>
+From: Sam James <[email protected]>
+Date: Wed, 1 Oct 2025 20:38:16 +0100
+Subject: [PATCH 3/3] sparc: don't reference obsolete termio struct for TC*
+ constants
+
+Similar in nature to ab107276607af90b13a5994997e19b7b9731e251. glibc-2.42
+drops the legacy termio struct, but the ioctls.h header still defines some
+TC* constants in terms of termio (via sizeof). Hardcode the values instead.
+
+This fixes building Python for example, which falls over like:
+  ./Modules/termios.c:1119:16: error: invalid application of 'sizeof' to 
incomplete type 'struct termio'
+
+Link: https://bugs.gentoo.org/961769
+Link: https://bugs.gentoo.org/962600
+Co-authored-by: Stian Halseth <[email protected]>
+Signed-off-by: Sam James <[email protected]>
+---
+ arch/sparc/include/uapi/asm/ioctls.h | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/arch/sparc/include/uapi/asm/ioctls.h 
b/arch/sparc/include/uapi/asm/ioctls.h
+index 7fd2f5873c9e7..b493dea7ca377 100644
+--- a/arch/sparc/include/uapi/asm/ioctls.h
++++ b/arch/sparc/include/uapi/asm/ioctls.h
+@@ -5,10 +5,10 @@
+ #include <asm/ioctl.h>
+ 
+ /* Big T */
+-#define TCGETA                _IOR('T', 1, struct termio)
+-#define TCSETA                _IOW('T', 2, struct termio)
+-#define TCSETAW               _IOW('T', 3, struct termio)
+-#define TCSETAF               _IOW('T', 4, struct termio)
++#define TCGETA          0x5405
++#define TCSETA          0x5406
++#define TCSETAW         0x5407
++#define TCSETAF         0x5408
+ #define TCSBRK                _IO('T', 5)
+ #define TCXONC                _IO('T', 6)
+ #define TCFLSH                _IO('T', 7)
+-- 
+2.51.0
+

diff --git 
a/6.16/00_all_0003-parisc-don-t-reference-obsolete-termio-struct-for-TC.patch 
b/6.16/00_all_0003-parisc-don-t-reference-obsolete-termio-struct-for-TC.patch
new file mode 100644
index 0000000..f7666ec
--- /dev/null
+++ 
b/6.16/00_all_0003-parisc-don-t-reference-obsolete-termio-struct-for-TC.patch
@@ -0,0 +1,44 @@
+From fc2e8775d55f43e08eb79d326d6fdd89291898dd Mon Sep 17 00:00:00 2001
+Message-ID: 
<fc2e8775d55f43e08eb79d326d6fdd89291898dd.1759348574.git....@gentoo.org>
+From: Sam James <[email protected]>
+Date: Wed, 1 Oct 2025 20:34:53 +0100
+Subject: [PATCH 1/3] parisc: don't reference obsolete termio struct for TC*
+ constants
+
+Similar in nature to ab107276607af90b13a5994997e19b7b9731e251. glibc-2.42
+drops the legacy termio struct, but the ioctls.h header still defines some
+TC* constants in terms of termio (via sizeof). Hardcode the values instead.
+
+This fixes building Python for example, which falls over like:
+  ./Modules/termios.c:1119:16: error: invalid application of 'sizeof' to 
incomplete type 'struct termio'
+
+Link: https://bugs.gentoo.org/961769
+Link: https://bugs.gentoo.org/962600
+Co-authored-by: Stian Halseth <[email protected]>
+Signed-off-by: Sam James <[email protected]>
+---
+ arch/parisc/include/uapi/asm/ioctls.h | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/arch/parisc/include/uapi/asm/ioctls.h 
b/arch/parisc/include/uapi/asm/ioctls.h
+index 82d1148c6379a..b90253c8265ae 100644
+--- a/arch/parisc/include/uapi/asm/ioctls.h
++++ b/arch/parisc/include/uapi/asm/ioctls.h
+@@ -10,10 +10,10 @@
+ #define TCSETS                _IOW('T', 17, struct termios) /* TCSETATTR */
+ #define TCSETSW               _IOW('T', 18, struct termios) /* TCSETATTRD */
+ #define TCSETSF               _IOW('T', 19, struct termios) /* TCSETATTRF */
+-#define TCGETA                _IOR('T', 1, struct termio)
+-#define TCSETA                _IOW('T', 2, struct termio)
+-#define TCSETAW               _IOW('T', 3, struct termio)
+-#define TCSETAF               _IOW('T', 4, struct termio)
++#define TCGETA          0x5405
++#define TCSETA          0x5406
++#define TCSETAW         0x5407
++#define TCSETAF         0x5408
+ #define TCSBRK                _IO('T', 5)
+ #define TCXONC                _IO('T', 6)
+ #define TCFLSH                _IO('T', 7)
+-- 
+2.51.0
+

Reply via email to