Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151668845
D25647.id74399.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
755 B
Referenced Files
None
Subscribers
None
D25647.id74399.diff
View Options
Index: head/lib/libc/gen/gethostname.3
===================================================================
--- head/lib/libc/gen/gethostname.3
+++ head/lib/libc/gen/gethostname.3
@@ -28,7 +28,7 @@
.\" @(#)gethostname.3 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd August 18, 2003
+.Dd July 13, 2020
.Dt GETHOSTNAME 3
.Os
.Sh NAME
@@ -68,9 +68,9 @@
This call is restricted to the super-user and
is normally used only when the system is bootstrapped.
.Pp
-Host names are limited to
-.Brq Dv HOST_NAME_MAX
-characters, not including the trailing null, currently 255.
+Applications should use
+.Fn sysconf _SC_HOST_NAME_MAX
+to find the maximum length of a host name (not including the terminating null).
.Sh RETURN VALUES
.Rv -std
.Sh ERRORS
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 10, 9:47 PM (7 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31248015
Default Alt Text
D25647.id74399.diff (755 B)
Attached To
Mode
D25647: PR 143472: gethostname(3) references undefined value: HOST_NAME_MAX
Attached
Detach File
Event Timeline
Log In to Comment