[PATCH v2] alpha: Use the generic gethostname
Florian Weimer
fweimer@redhat.com
Mon Aug 10 09:13:23 GMT 2026
* Magnus Lindholm:
> alpha was the only target implementing gethostname with the syscall
> rather than through uname. Its only behavioural difference was the errno
> for a too-small buffer: it reported EOVERFLOW where the generic
> implementation, gethostname(2) and misc/tst-gethostname expect
> ENAMETOOLONG, so alpha failed that test:
>
> tst-gethostname.c:96: numeric comparison failure
> left: 112 (0x70, EOVERFLOW); from: errno
> right: 63 (0x3f); from: ENAMETOOLONG
>
> The file contains nothing but that function, so removing it lets the
> sysdeps search fall through to sysdeps/posix/gethostname.c, which
> produces the same buffer contents and the expected errno.
> misc/tst-gethostname passes on alpha with it.
>
> Suggested-by: Florian Weimer <fw@deneb.enyo.de>
> Signed-off-by: Magnus Lindholm <linmag7@gmail.com>
> ---
> v1: https://inbox.sourceware.org/libc-alpha/20260809205317.3278454-1-linmag7@gmail.com/
> v2: remove the file rather than change the errno, per review.
>
> sysdeps/unix/sysv/linux/alpha/gethostname.c | 44 ---------------------
> 1 file changed, 44 deletions(-)
> delete mode 100644 sysdeps/unix/sysv/linux/alpha/gethostname.c
Looks okay to me.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
Magnus, should I push this on your behalf?
Thanks,
Florian
More information about the Libc-alpha
mailing list