From owner-svn-src-stable-12@freebsd.org Mon Jul 20 16:51:19 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8593E363CC0; Mon, 20 Jul 2020 16:51:19 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B9SRW2ycHz4JbW; Mon, 20 Jul 2020 16:51:19 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 48B0BFF9A; Mon, 20 Jul 2020 16:51:19 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06KGpJxt006762; Mon, 20 Jul 2020 16:51:19 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06KGpJqe006761; Mon, 20 Jul 2020 16:51:19 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202007201651.06KGpJqe006761@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Mon, 20 Jul 2020 16:51:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r363371 - stable/12/lib/libc/gen X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: stable/12/lib/libc/gen X-SVN-Commit-Revision: 363371 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jul 2020 16:51:19 -0000 Author: gbe (doc committer) Date: Mon Jul 20 16:51:18 2020 New Revision: 363371 URL: https://svnweb.freebsd.org/changeset/base/363371 Log: MFC r363147: gethostname(3): Correct the reference of the undefined value HOST_NAME_MAX PR: 143472 Submitted by: bcran@ Reported by: Jeremy Huddleston Reviewed by: bcr (mentor) Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D25647 Modified: stable/12/lib/libc/gen/gethostname.3 Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/gen/gethostname.3 ============================================================================== --- stable/12/lib/libc/gen/gethostname.3 Mon Jul 20 16:48:46 2020 (r363370) +++ stable/12/lib/libc/gen/gethostname.3 Mon Jul 20 16:51:18 2020 (r363371) @@ -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 @@ which has length 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