From patchwork Thu Feb 3 19:00:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Fredrickson X-Patchwork-Id: 1588175 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=Mwf7Iqgk; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=uclibc-ng.org (client-ip=2a00:1828:2000:679::23; helo=helium.openadk.org; envelope-from=devel-bounces@uclibc-ng.org; receiver=) Received: from helium.openadk.org (helium.openadk.org [IPv6:2a00:1828:2000:679::23]) (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) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JqSht5k3Pz9s9c for ; Fri, 4 Feb 2022 06:02:20 +1100 (AEDT) Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id 08CBC31E0801; Thu, 3 Feb 2022 20:02:10 +0100 (CET) Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by helium.openadk.org (Postfix) with ESMTPS id 7378F31E00BB for ; Thu, 3 Feb 2022 20:02:04 +0100 (CET) Received: by mail-pl1-f170.google.com with SMTP id d1so2955455plh.10 for ; Thu, 03 Feb 2022 11:02:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=v7SMHbvYHgBW+ADc0tBjGWcX4i1cFilHQeQcHigf+WY=; b=Mwf7Iqgky+4MjjdP4+YsaRDQ1jn/XgevfbYAvg8+JqbOXSZPbuQUDec4tpr12z9m8E daVnHKXFIo2OoJLowno2JxuWSncQwMcGBoWmGJsrQp7DoSksIO3aBGkzckGMOD+Ff/j1 sodpR4goYbnhzS6FgnlB8aCHffiIRVstHNofewyWxKE9kEsIs+8sEdJ34IQiB/7CDv2/ 3oDoUU8fy6Y+DvU/Q2epnEtL1Ib/uY5xiEAiA/NkHg4dlJ8sl+udZPcqY4a8a+4S6hBM ePZaH8E23tZMoOtM+k4gM/leelNlKoQE0SYA7NGaaTUWkiyPNOogecZj3Dl1fFcIap0Z 6hew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=v7SMHbvYHgBW+ADc0tBjGWcX4i1cFilHQeQcHigf+WY=; b=blSeJNaF+qpl7KJuuS3nJz5pKnq73v0dhNNYOvV3YRVN44hJFixsSTYynP2h8IXdBe TMgif+uO7WCbbk4//7AYKChqyNUv5Snvop1Z1nBWf4mPPIjGLsEHLm4U8je/B2P5jqZR ubkgfJACo+YGrGgc/aHZyU22XkkK7EJveuBMlc/93egSx49FTf9mP/X2E2kqXFMLTyJW BvRpR8QURX7LVe42VBb2Hh/pPf7nP6NEuk8VhtJzO5QqII8g6x0i1kLYjIA1BFugyghT zpLvnFhUHl+6/rjzEqdHYyJKpVIq/5aKB0MeQdVcavWknafqOB+67FYz1A08X24uHW8p DKtg== X-Gm-Message-State: AOAM532vtEEVuczPHsbYt9F3oTZgSld8XxaN2YOPnY6TkZ+DbMoa1fJ9 UUEemYrlfvLcpEt+piacUnCb2dexC8k= X-Google-Smtp-Source: ABdhPJxAKiXnkNOsBNSlQOwjHfQbt/MG+nbRDIiFniR7qo6ovuB9lGXIfx3krSbJy75JBTy5EVxXvA== X-Received: by 2002:a17:902:7893:: with SMTP id q19mr24372155pll.9.1643914922006; Thu, 03 Feb 2022 11:02:02 -0800 (PST) Received: from localhost.localdomain ([199.119.84.5]) by smtp.gmail.com with ESMTPSA id g22sm27117429pfc.177.2022.02.03.11.02.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Feb 2022 11:02:01 -0800 (PST) From: lancethepants To: devel@uclibc-ng.org Date: Thu, 3 Feb 2022 12:00:07 -0700 Message-Id: <20220203190006.23208-1-lancethepants@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Message-ID-Hash: AORZNE256T5MJPZ43S6M52LG536TQNB5 X-Message-ID-Hash: AORZNE256T5MJPZ43S6M52LG536TQNB5 X-MailFrom: lancethepants@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list Subject: [uclibc-ng-devel] [PATCH] guard new syscall prlimit List-Id: uClibc-ng Development Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This patch guards the newly added syscall wrapper prlimit for kernels that predate this feature. Lance Fredrickson --- libc/sysdeps/linux/common/prlimit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libc/sysdeps/linux/common/prlimit.c b/libc/sysdeps/linux/common/prlimit.c index cdb64ba0d..dbb0de0d3 100644 --- a/libc/sysdeps/linux/common/prlimit.c +++ b/libc/sysdeps/linux/common/prlimit.c @@ -18,6 +18,7 @@ #include #include +#ifdef __NR_prlimit int prlimit (__pid_t pid, enum __rlimit_resource resource, const struct rlimit *new_rlimit, struct rlimit *old_rlimit) @@ -25,3 +26,4 @@ prlimit (__pid_t pid, enum __rlimit_resource resource, return INLINE_SYSCALL (prlimit64, 4, pid, resource, new_rlimit, old_rlimit); } +#endif