diff mbox series

[hurd,commited] hurd: [!__USE_MISC] Do not #undef BSD macros in ioctls

Message ID 20231202202712.1077537-1-samuel.thibault@ens-lyon.org
State New
Headers show
Series [hurd,commited] hurd: [!__USE_MISC] Do not #undef BSD macros in ioctls | expand

Commit Message

Samuel Thibault Dec. 2, 2023, 8:27 p.m. UTC
When e.g. including termios.h first and then sys/ioctl.h, without e.g.
_BSD_SOURCE, the latter would #undef e.g. ECHO, without defining it.
---
 sysdeps/mach/hurd/bits/ioctls.h | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/sysdeps/mach/hurd/bits/ioctls.h b/sysdeps/mach/hurd/bits/ioctls.h
index 943d5e4287..1b2fd6b33f 100644
--- a/sysdeps/mach/hurd/bits/ioctls.h
+++ b/sysdeps/mach/hurd/bits/ioctls.h
@@ -25,6 +25,7 @@ 
 /* These macros are also defined in <bits/termios.h> (with numerically
    identical values) but this serves to shut up cpp's complaining. */
 
+#ifdef __USE_MISC
 #ifdef NL0
 # undef NL0
 #endif
@@ -82,6 +83,7 @@ 
 #ifdef NOFLSH
 # undef NOFLSH
 #endif
+#endif
 
 /* Hurd ioctl request are made up of several fields: