[LTP] [PATCH v3] gethostname02: Accept EOVERFLOW on alpha
Cyril Hrubis
chrubis@suse.cz
Wed Jun 3 11:31:50 CEST 2026
Hi!
> On alpha glibc's gethostname() directly calls the kernel
> syscall and sets errno to EOVERFLOW when the buffer is
> too small, because the kernel truncates silently and the
> string is not null terminated.
>
> On the other hand, the generic posix implementation used
> on x86_64 sets ENAMETOOLONG in this case.
>
> Fix this by accepting both errnos.
Looking at man gethostname it's not supposed to return EOVERFLOW. I'm
not sure that we want to work around this in the tests.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list