commit:     7ff4c957afc315dac2a6421fc283c5c8b90d1811
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 31 00:57:34 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Dec 31 00:59:33 2025 +0000
URL:        
https://gitweb.gentoo.org/proj/toolchain/linux-headers-patches.git/commit/?id=7ff4c957

6.18: new patchset

* 00_all_0001-unifdef-drop-unused-errno.h-include.patch
* 00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
* 00_all-0003-alpha-don-t-reference-obsolete-termio-struct-for-TC-.patch
* 00_all-0004-sparc-don-t-reference-obsolete-termio-struct-for-TC-.patch

i.e. dropped the parisc/hppa termios patch as it landed upstream. The
alpha one is in Linus' tree for 6.19. sparc hasn't had a reply yet.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...-reference-obsolete-termio-struct-for-TC-.patch | 45 +++++++++++++++++++++
 ...-reference-obsolete-termio-struct-for-TC-.patch | 46 ++++++++++++++++++++++
 ..._0001-unifdef-drop-unused-errno.h-include.patch | 32 +++++++++++++++
 ...build-relocs-tool-when-installing-headers.patch | 33 ++++++++++++++++
 4 files changed, 156 insertions(+)

diff --git 
a/6.18/00_all-0003-alpha-don-t-reference-obsolete-termio-struct-for-TC-.patch 
b/6.18/00_all-0003-alpha-don-t-reference-obsolete-termio-struct-for-TC-.patch
new file mode 100644
index 0000000..d42fad3
--- /dev/null
+++ 
b/6.18/00_all-0003-alpha-don-t-reference-obsolete-termio-struct-for-TC-.patch
@@ -0,0 +1,45 @@
+From 99f1a93cf8cd4f0ece8611be2860677084663aac Mon Sep 17 00:00:00 2001
+Message-ID: 
<99f1a93cf8cd4f0ece8611be2860677084663aac.1759359739.git....@gentoo.org>
+From: Sam James <[email protected]>
+Date: Wed, 1 Oct 2025 20:37:40 +0100
+Subject: [PATCH 1/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]>
+Co-authored-by: Magnus Lindholm <[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..a09d04b49cc65 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          0x40127417
++#define TCSETA          0x80127418
++#define TCSETAW         0x80127419
++#define TCSETAF         0x8012741c
+ 
+ #define TCSBRK                _IO('t', 29)
+ #define TCXONC                _IO('t', 30)
+-- 
+2.51.0
+

diff --git 
a/6.18/00_all-0004-sparc-don-t-reference-obsolete-termio-struct-for-TC-.patch 
b/6.18/00_all-0004-sparc-don-t-reference-obsolete-termio-struct-for-TC-.patch
new file mode 100644
index 0000000..9ea7c17
--- /dev/null
+++ 
b/6.18/00_all-0004-sparc-don-t-reference-obsolete-termio-struct-for-TC-.patch
@@ -0,0 +1,46 @@
+From e11ecaf723594bf01c66fc5c80c25bda0621f34f Mon Sep 17 00:00:00 2001
+Message-ID: 
<e11ecaf723594bf01c66fc5c80c25bda0621f34f.1759359739.git....@gentoo.org>
+In-Reply-To: 
<99f1a93cf8cd4f0ece8611be2860677084663aac.1759359739.git....@gentoo.org>
+References: 
<99f1a93cf8cd4f0ece8611be2860677084663aac.1759359739.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..f26befbf690fb 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          0x40125401
++#define TCSETA          0x80125402
++#define TCSETAW         0x80125403
++#define TCSETAF         0x80125404
+ #define TCSBRK                _IO('T', 5)
+ #define TCXONC                _IO('T', 6)
+ #define TCFLSH                _IO('T', 7)
+-- 
+2.51.0
+

diff --git a/6.18/00_all_0001-unifdef-drop-unused-errno.h-include.patch 
b/6.18/00_all_0001-unifdef-drop-unused-errno.h-include.patch
new file mode 100644
index 0000000..617eb9a
--- /dev/null
+++ b/6.18/00_all_0001-unifdef-drop-unused-errno.h-include.patch
@@ -0,0 +1,32 @@
+From c4d1a109c5c0b1bd27d2b5448a1306a2f6005339 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <[email protected]>
+Date: Tue, 6 Dec 2011 17:22:42 -0500
+Subject: [PATCH] unifdef: drop unused errno.h include
+
+This is the only header on my system that ends up requiring kernel
+headers, so if the kernel headers aren't available, we end up being
+unable to install kernel headers :).
+
+Since this file doesn't actually use anything from errno.h, drop
+the include so it at least makes us a bit more robust on glibc.
+
+Signed-off-by: Mike Frysinger <[email protected]>
+---
+ scripts/unifdef.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/scripts/unifdef.c b/scripts/unifdef.c
+index 7493c0ee51cc..c5dfae538b08 100644
+--- a/scripts/unifdef.c
++++ b/scripts/unifdef.c
+@@ -48,7 +48,6 @@
+ 
+ #include <ctype.h>
+ #include <err.h>
+-#include <errno.h>
+ #include <stdarg.h>
+ #include <stdbool.h>
+ #include <stdio.h>
+-- 
+2.16.1
+

diff --git 
a/6.18/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch 
b/6.18/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
new file mode 100644
index 0000000..c1c7214
--- /dev/null
+++ 
b/6.18/00_all_0002-x86-do-not-build-relocs-tool-when-installing-headers.patch
@@ -0,0 +1,33 @@
+From 57875de37c5375ea95e1e949ec7c741d0038d3a1 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <[email protected]>
+Date: Sat, 15 Nov 2014 03:37:38 -0500
+Subject: [PATCH] x86: do not build relocs tool when installing headers
+
+This isn't needed to install headers, so don't bother building it.
+Otherwise we run into a chicken/egg issue where we need the kernel
+headers in order to install the kernel headers.  It's also a waste
+of time.
+
+Signed-off-by: Mike Frysinger <[email protected]>
+---
+ arch/x86/Makefile | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/arch/x86/Makefile b/arch/x86/Makefile
+index 60135cbd905c..9b15b2daa77f 100644
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -215,8 +215,10 @@
+ endif
+ 
+ 
++ifneq ($(filter-out headers_install,$(MAKECMDGOALS)),)
+ archscripts: scripts_basic
+       $(Q)$(MAKE) $(build)=arch/x86/tools relocs
++endif
+ 
+ ###
+ # Syscall table generation
+-- 
+2.16.1
+

Reply via email to