From nobody Wed Nov 22 19:18:01 2023 X-Original-To: dev-commits-src-main@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 4Sb9xk0r9Sz51ZBB; Wed, 22 Nov 2023 19:18:02 +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 4Sb9xk0Q2Cz4GlH; Wed, 22 Nov 2023 19:18:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700680682; 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=0AFyLgAzsN3A6xZSjW1PLhpYFBb1B8ASOMYhwPEat90=; b=Qo6BfkwP6dpQb6fp8L3bOy3ow8E0FVRN09QmVR3J+1JYUDEnJwO3SR4qTF02hzrR8H35tL 3SkAkUY/pCiHNJ13RYwoASbJPfgljZ0gytY3Ved9Huw7LHa3V9BATZkiWe3tEbonB0ZSJb BaWwOdRANY+z9d14NbsnBO3L5NW+WOwEoFdo0VqfK9WZ7CzoJZzf0tx4tGHA3dnbiVMMRh fRtDtUeIaF5qOEbnVxomcOr5C0oYFRD+/Lt/OYwbwsdPzWXbjLDKLsa1qo3RCozBIIRKNq F+CW9mwREhHNK2LPfzKJ6opOShu6QPmQm+c4CDk+KRPUZBVfbf5qbORpKV4U7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700680682; 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=0AFyLgAzsN3A6xZSjW1PLhpYFBb1B8ASOMYhwPEat90=; b=U3bw7MoDMfvH8e4cYO+SQL/1hwrZ5rnPc4CK2v7gyPzuzDZDgfkrJ5y2P5H7T/9IwIdYcN PmHXmyTpmaXNm3aHSuns84pVx4AfxoiMzYZJV43bXc8A4REqJQP4p1u8TD2FudWqlXggQQ 6OyacwoLR386k1AXd/WeOAXuJbjvJ97GT+hlU6w0i3a8UDsQEDdNCG7+BMAemII/IkxN9k lwyObcZpxU3hA9EUrFCEGYFre/X3m4h4vxKw+0xvk99bGpBomD2Q4XcQnVsDe2z1d7kqeZ 8emWn5AkegQ4lgs9Jc7UTJTK9aP8O2gKUdR3sVZQAKMxA4a8ahnTWzI1CDOiYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700680682; a=rsa-sha256; cv=none; b=d2pjhxr4XWz+/rmNJJyNaPSgDEM356vvYhc7RC263G905YLZ9spVXYz87rxoVFLXO+vSwj hWe8Gdlqham2jI71xUR9NKMDQtFwiULwICrKZ4NZG4qyudi/g3hdxyIUto9hqOb4RMMRhd 2NSLRs+4sY/P/cVZGeF3ILTfhHFK+5tetURUR5HhY++7r/oogmqO3kg7bTTjcIS3O0CYjO +QJwfBda8AT9NCpzWcNsdyhbnNPJuYwCqjXYfUdNw2Yf6S/tE2gWRanGCuS2De0dMH56Y9 +0i/1mv54GXcyZKvTwndMCjoSmfnrOUeA6CW4QzbCx6wboPvvLsXs4LyAuVpcw== 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 4Sb9xj6ZqyzWxN; Wed, 22 Nov 2023 19:18:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AMJI18U020166; Wed, 22 Nov 2023 19:18:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AMJI1VY020163; Wed, 22 Nov 2023 19:18:01 GMT (envelope-from git) Date: Wed, 22 Nov 2023 19:18:01 GMT Message-Id: <202311221918.3AMJI1VY020163@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: e0205aa325c0 - main - kern_rctl.c: Minimal includes when RCTL not defined List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: e0205aa325c0936ccdd0e635576875786c41f6c3 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e0205aa325c0936ccdd0e635576875786c41f6c3 commit e0205aa325c0936ccdd0e635576875786c41f6c3 Author: Olivier Certner AuthorDate: 2023-10-19 14:28:06 +0000 Commit: Ed Maste CommitDate: 2023-11-22 19:17:17 +0000 kern_rctl.c: Minimal includes when RCTL not defined If RCTL is not defined, only the system call stubs returning ENOSYS are compiled in. In this case, don't waste time including most headers since their code is not used. Reviewed by: markj MFC after: 2 weeks Sponsored by: The FreeBSD Foundation --- sys/kern/kern_rctl.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_rctl.c b/sys/kern/kern_rctl.c index 799fcd76b77e..8e65fabeddc9 100644 --- a/sys/kern/kern_rctl.c +++ b/sys/kern/kern_rctl.c @@ -28,6 +28,8 @@ * SUCH DAMAGE. */ +#ifdef RCTL + #include #include #include @@ -56,7 +58,6 @@ #include #include -#ifdef RCTL #ifndef RACCT #error "The RCTL option requires the RACCT option" #endif @@ -2204,6 +2205,9 @@ rctl_init(void) #else /* !RCTL */ +#include +#include + int sys_rctl_get_racct(struct thread *td, struct rctl_get_racct_args *uap) { @@ -2239,4 +2243,4 @@ sys_rctl_remove_rule(struct thread *td, struct rctl_remove_rule_args *uap) return (ENOSYS); } -#endif /* !RCTL */ +#endif /* RCTL */