From nobody Tue Feb 27 10:38:32 2024 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 4TkYqY1cg3z5CvPJ; Tue, 27 Feb 2024 10:38:33 +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 4TkYqX6kxZz4svh; Tue, 27 Feb 2024 10:38:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709030312; 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=DftR0Gagdph5vJzPlqwd9HmnzNDmcMZqqJGvCMYzCb0=; b=yaHT8u4+KCvisG+P1iTGazl4XwgbfZ/NLC9oMcM1jD0q+gixAoD4+JEu9t4RjYbHJ6Ar7d J3/s/zNnqEamWjkhp5+h4CvEy4Csjbx6dr7CN2jOcE5KZ74XRz3u7owWmUMmWT7e3pCj9X coW2YpI/r5LsWUVYZsVzBmN4WhE2a534nj5e18kFMIc+hXF/Abx0BByx6MoWMzKFKXQzjI 4DOEAg8L7OWvc7h/cJp89k9R/OOHkogQK5qB+K/O3zmZ2cFtWug4MZ6eI8M0RUxgerv8xV lEO3+rXQnesgK1yWkY+adBfnbAWOu7oVoFc5X9fyOJk7wLnUCrNEmCsJYg82tw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709030312; a=rsa-sha256; cv=none; b=YgRsQhqapk5mXe03Sw/tjLlgKLKRA6WIP6Fhl0YMxISSo9z9JgaZR3Wn35IiSCdwbJdYFS B7ePY6zD9WBbmBZnK2qd8M7rmUg8suICsK+vjek/64hiCoDzFBxVOUigwuHfzDzOduedaB 5XhDGXLGqqxGuTNjNULu9UQtLMzeK/+KKScQS8n06jFTxTG/ePetYOg5LJRNiKIyonkwCJ vl4tjVnmVS7u/sCKUoF7Pl+cI0Xq74u8J2QqBF8DQjL5hUPvMK941Xl82edF53ocuWt/n5 tvZmLU0UxcuIwUXAK6LEOM0XMjXSghPU9+J2Wj0doakCuoLt+a52vTDtbz04Qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709030312; 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=DftR0Gagdph5vJzPlqwd9HmnzNDmcMZqqJGvCMYzCb0=; b=NAvNATeXlpQZvOIO26RN87OSEolGAFU3hnAsYGUuCgAieyePAXToTc1P/ZXdGLNZfSAeT8 No9hg3Low3Ic+mOl03Wd9jqFgnXtUMjnw4uF7A7qj7ey57nt1W894S7duCNqV2wkNfB2BI PtT6Jbv3iljyQvnerL15odSG0LrYuNAieR0Ni64X514s73TS5CYSTnOLNSNsvbQ84fmEee UVY4VYlnkZU0PJLE/mv+4l5TP8w47kZNn8Ss83enG0wRAPgXM8GFsNHvQZAhYt+qkxAwv5 XsO0mxRcak+wq1tHb9py/k7NDhnyK09EO6V8dPhjBcPaLn1bYfJICfnQj3D8AQ== 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 4TkYqX5r48z182F; Tue, 27 Feb 2024 10:38:32 +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 41RAcWN2063947; Tue, 27 Feb 2024 10:38:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41RAcWPe063944; Tue, 27 Feb 2024 10:38:32 GMT (envelope-from git) Date: Tue, 27 Feb 2024 10:38:32 GMT Message-Id: <202402271038.41RAcWPe063944@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: e36cb22221e1 - stable/14 - kern_rctl.c: Minimal includes when RCTL not defined 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e36cb22221e11b711830509479fd56df69221b0e Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=e36cb22221e11b711830509479fd56df69221b0e commit e36cb22221e11b711830509479fd56df69221b0e Author: Olivier Certner AuthorDate: 2023-10-19 14:28:06 +0000 Commit: Olivier Certner CommitDate: 2024-02-27 10:37:23 +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 (cherry picked from commit e0205aa325c0936ccdd0e635576875786c41f6c3) Approved by: emaste (mentor) --- 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 */