From nobody Sun Nov 28 18:08:08 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4567E18B2CF2; Sun, 28 Nov 2021 18:08:09 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J2GgD74w5z4mMB; Sun, 28 Nov 2021 18:08:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D2EA61366D; Sun, 28 Nov 2021 18:08:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1ASI883A035193; Sun, 28 Nov 2021 18:08:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ASI88j4035192; Sun, 28 Nov 2021 18:08:08 GMT (envelope-from git) Date: Sun, 28 Nov 2021 18:08:08 GMT Message-Id: <202111281808.1ASI88j4035192@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: a4ef9e58bc0c - main - sbin: build ping if at least one of INET & INET6 is enabled List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a4ef9e58bc0c07110a54ba0fa88eb118c5377e6f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638122889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sANCbTn4KnHcgx7vE4P7m77/CdGMeqdMqfO6TdaCs9M=; b=aQjSiOGYoxYs1n2i+WooHD8kr+/tYkGL3mZTfTqF+45gmcQutUSHkIk774fe6EP6fQywAS WqMa8laQBdYNuK5I9HjmHvY3tb8VvroZoyNDp/NcGVSq5lnbfFRfz8cjXWMktwIwdg090m rFNGivobCAtFWagD2Fbx2F+GVlEU5oOSiH3XW35jHGTnS73Qanf1vu+dc23tLLzovUEHj3 VkwQLoBDNdzcVAnvy5pHlkd9lUwhA3Ts8CXQXGN3zaTPDAnf41GmF2PY7etssr2HCwhKjC hn7bxHasQhgkxQ6HMaeb4Afq59AZQK8RdkdtZx3ZP8coDEN0DvfceXcCseR2Tw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638122889; a=rsa-sha256; cv=none; b=KuE/n/dkOgPO5msfq5lq9Yq6nQQq+/ANiizQSSb34SvR96uIgL8aSEJ3V/NqqNpawTrBJw uk0iSSUfLszQTdsvRQ+7WlBVzxqbqZla7V/slP8OeYChmUVGlZhK6nropRV1pthwn6hbvq mw9weQffUMU2gchmL7vT8saypoTQ8OW6UpklJHUXKQg4fEKDV/eQbVEGuY5OERhwwqcXJh 4sx8tZDzOHDX5JWKiM/x2IskbDqW8oCeNoLWgmaOQqBbJGoU7Qy+5KhAhGkWhTT3sh9XBu koo35ON5qvwKS8iIwLEAyNAtarYLwAgZ+h95/oWqYLteoM+zWZuS49f7pQiFMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a4ef9e58bc0c07110a54ba0fa88eb118c5377e6f commit a4ef9e58bc0c07110a54ba0fa88eb118c5377e6f Author: Ed Maste AuthorDate: 2021-11-28 17:50:13 +0000 Commit: Ed Maste CommitDate: 2021-11-28 18:05:39 +0000 sbin: build ping if at least one of INET & INET6 is enabled It does not build (and serves no purpose) if neither is true (i.e., building WITHOUT_INET and WITHOUT_INET6). Also add an explicit error in ping to make this case clear. PR: 260082 Sponsored by: The FreeBSD Foundation --- sbin/Makefile | 5 ++++- sbin/ping/main.c | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sbin/Makefile b/sbin/Makefile index 7eb497e3e3dd..69cf51a83e26 100644 --- a/sbin/Makefile +++ b/sbin/Makefile @@ -53,7 +53,6 @@ SUBDIR=adjkerntz \ nfsiod \ nos-tun \ pfilctl \ - ping \ rcorder \ reboot \ recoverdisk \ @@ -68,6 +67,10 @@ SUBDIR=adjkerntz \ tunefs \ umount +.if ${MK_INET} != "no" || ${MK_INET6} != "no" +SUBDIR+= ping +.endif + SUBDIR.${MK_CCD}+= ccdconfig SUBDIR.${MK_CXX}+= devd SUBDIR.${MK_HAST}+= hastctl diff --git a/sbin/ping/main.c b/sbin/ping/main.c index c021e2c26b14..1d0b714f1480 100644 --- a/sbin/ping/main.c +++ b/sbin/ping/main.c @@ -57,6 +57,8 @@ __FBSDID("$FreeBSD$"); #define OPTSTR PING4OPTS #elif defined(INET6) #define OPTSTR PING6OPTS +#else +#error At least one of INET and INET6 is required #endif int