From a2eaa7ec514384dd7a261430b8150967fadf387d Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Sat, 7 Nov 2026 09:50:54 +0100 Subject: [PATCH] hurd: update _PATH_* constants Add _PATH_DEFPATH & _PATH_BSHELL, as they are available on almost all the other OSes: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/generic/paths.h;h=6b8f44042818b0524c132f679d53399114b62aac;hb=HEAD Also remove the _PATH_ constants from netdb.h: they are not provided by any other OS (only Hurd), and indeed there is nothing that uses them (at least checking what is available in Debian). They can be added back for all the OS when there is a request for them. --- src/unix/hurd/mod.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/unix/hurd/mod.rs b/src/unix/hurd/mod.rs index c1ccac4e16f5..3a39b926e447 100644 --- a/src/unix/hurd/mod.rs +++ b/src/unix/hurd/mod.rs @@ -1651,12 +1651,6 @@ pub const SEM_VALUE_MAX: c_int = 2147483647; pub const MAXNAMLEN: usize = 255; // netdb.h -pub const _PATH_HEQUIV: &[u8; 17usize] = b"/etc/hosts.equiv\0"; -pub const _PATH_HOSTS: &[u8; 11usize] = b"/etc/hosts\0"; -pub const _PATH_NETWORKS: &[u8; 14usize] = b"/etc/networks\0"; -pub const _PATH_NSSWITCH_CONF: &[u8; 19usize] = b"/etc/nsswitch.conf\0"; -pub const _PATH_PROTOCOLS: &[u8; 15usize] = b"/etc/protocols\0"; -pub const _PATH_SERVICES: &[u8; 14usize] = b"/etc/services\0"; pub const HOST_NOT_FOUND: c_int = 1; pub const TRY_AGAIN: c_int = 2; pub const NO_RECOVERY: c_int = 3; @@ -2887,6 +2881,10 @@ pub const IFF_PORTSEL: c_int = 0x2000; pub const IFF_AUTOMEDIA: c_int = 0x4000; pub const IFF_DYNAMIC: c_int = 0x8000; +// paths.h +pub const _PATH_DEFPATH: *const c_char = cstr!("/usr/bin:/bin"); +pub const _PATH_BSHELL: *const c_char = cstr!("/bin/sh"); + // random.h pub const GRND_NONBLOCK: c_uint = 1; pub const GRND_RANDOM: c_uint = 2;