guix_mirror_bot pushed a commit to branch core-packages-team
in repository guix.

commit d4b3d67b6fa0feb9cc057a801fd220735e97c59d
Author: Yelninei <[email protected]>
AuthorDate: Fri Jul 24 16:25:56 2026 +0000

    gnu: glibc: Disable more ioctls on the Hurd.
    
    * gnu/packages/patches/glibc-hurd-unsupported-ioctls.patch: New patch.
    * gnu/packages/base.scm (%glibc-patches): Add it.
    * gnu/local.mk (dist_patch_DATA): Register it.
    
    Change-Id: Ibe73545388a81fc9195329f3190da60ab07743d9
---
 gnu/local.mk                                       |  1 +
 gnu/packages/base.scm                              |  1 +
 .../patches/glibc-hurd-unsupported-ioctls.patch    | 52 ++++++++++++++++++++++
 3 files changed, 54 insertions(+)

diff --git a/gnu/local.mk b/gnu/local.mk
index dfd8da40d5b..3a3bdffd303 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1519,6 +1519,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/glibc-hurd-getauxval.patch              \
   %D%/packages/patches/glibc-hurd-gettyent.patch               \
   %D%/packages/patches/glibc-hurd-mach-print.patch             \
+  %D%/packages/patches/glibc-hurd-unsupported-ioctls.patch     \
   %D%/packages/patches/glibc-hurd-signal-sa-siginfo.patch      \
   %D%/packages/patches/glibc-hurd64-gcc-14.2-tls-bug.patch     \
   %D%/packages/patches/glibc-ldd-powerpc.patch                 \
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 128004f0014..5474a910dab 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -920,6 +920,7 @@ the store.")
         "glibc-2.37-hurd-clock_t_centiseconds.patch"
         "glibc-2.41-hurd-local-clock_gettime_MONOTONIC.patch"
         "glibc-2.43-hurd-unimplemented-ioctls.patch"
+        "glibc-hurd-unsupported-ioctls.patch"
         "glibc-hurd-mach-print.patch"
         "glibc-hurd-gettyent.patch"
         "glibc-hurd-getauxval.patch"
diff --git a/gnu/packages/patches/glibc-hurd-unsupported-ioctls.patch 
b/gnu/packages/patches/glibc-hurd-unsupported-ioctls.patch
new file mode 100644
index 00000000000..78be8b8362a
--- /dev/null
+++ b/gnu/packages/patches/glibc-hurd-unsupported-ioctls.patch
@@ -0,0 +1,52 @@
+From 
https://salsa.debian.org/glibc-team/glibc/-/blob/sid/debian/patches/hurd-i386/local-no_unsupported_ioctls.diff.
+
+These ioctls are not actually supported (and will probably not be in the
+close future), and are not available on Linux either, so don't expose
+them to application at the risk of them complaining that they don't work
+(e.g. xterm using TIOCLSET).
+
+---
+ sysdeps/mach/hurd/bits/ioctls.h |    6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/sysdeps/mach/hurd/bits/ioctls.h
++++ b/sysdeps/mach/hurd/bits/ioctls.h
+@@ -274,11 +274,13 @@
+ #define       FIOSETOWN       _IOW('f', 124, int)     /* set owner */
+ #define       FIOGETOWN       _IOR('f', 123, int)     /* get owner */
+ 
++#if 0
+ /* socket i/o controls */
+ #define       SIOCSHIWAT      _IOW('s',  0, int)              /* set high 
watermark */
+ #define       SIOCGHIWAT      _IOR('s',  1, int)              /* get high 
watermark */
+ #define       SIOCSLOWAT      _IOW('s',  2, int)              /* set low 
watermark */
+ #define       SIOCGLOWAT      _IOR('s',  3, int)              /* get low 
watermark */
++#endif
+ #define       SIOCATMARK      _IOR('s',  7, int)              /* at oob mark? 
*/
+ #define       SIOCSPGRP       _IOW('s',  8, int)              /* set process 
group */
+ #define       SIOCGPGRP       _IOR('s',  9, int)              /* get process 
group */
+@@ -330,7 +332,9 @@
+ #ifdef __USE_MISC
+ #define OTIOCGETD     _IOR('t', 0, int)       /* get line discipline */
+ #define OTIOCSETD     _IOW('t', 1, int)       /* set line discipline */
++#if 0
+ #define       TIOCHPCL        _IO('t', 2)             /* hang up on last 
close */
++#endif
+ #define       TIOCGETP        _IOR('t', 8,struct sgttyb)/* get parameters -- 
gtty */
+ #define       TIOCSETP        _IOW('t', 9,struct sgttyb)/* set parameters -- 
stty */
+ #define       TIOCSETN        _IOW('t',10,struct sgttyb)/* as above, but no 
flushtty*/
+@@ -383,6 +387,7 @@
+ #define               PENDIN          0x20000000      /* tp->t_rawq needs 
reread */
+ #define               DECCTQ          0x40000000      /* only ^Q starts after 
^S */
+ #define               NOFLSH          0x80000000      /* no output flush on 
signal */
++#if 0
+ #define       TIOCLBIS        _IOW('t', 127, int)     /* bis local mode bits 
*/
+ #define       TIOCLBIC        _IOW('t', 126, int)     /* bic local mode bits 
*/
+ #define       TIOCLSET        _IOW('t', 125, int)     /* set entire local 
mode word */
+@@ -409,5 +414,6 @@
+ #define       NETLDISC        1
+ #define       NTTYDISC        2
+ #endif
++#endif
+ 
+ #endif /* bits/ioctls.h */

Reply via email to