.B EINVAL
.I len
is negative or, for
-.BR sethostname ,
+.BR sethostname (),
.I len
is larger than the maximum allowed size,
or, for
-.BR gethostname
+.BR gethostname ()
on Linux/i386,
.I len
is smaller than the actual size.
.TP
.B EPERM
For
-.BR sethostname ,
+.BR sethostname (),
the caller did not have the
.B CAP_SYS_ADMIN
capability.
.SH "CONFORMING TO"
SVr4, 4.4BSD (this function first appeared in 4.2BSD).
POSIX 1003.1-2001 specifies
-.B gethostname
+.BR gethostname ()
but not
-.BR sethostname .
+.BR sethostname ().
.SH BUGS
For many Linux kernel / libc combinations
-.B gethostname
+.BR gethostname ()
will return an error instead of returning a truncated hostname.
.SH NOTES
SUSv2 guarantees that `Host names are limited to 255 bytes'.