From patchwork Wed Dec 5 22:25:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 1008475 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-98026-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="E3OsaZ03"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 439Cx762W8z9s6w for ; Thu, 6 Dec 2018 09:25:47 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; q=dns; s= default; b=VVScESRs58ksWW2OcK9ZXDK6gYiFcstqq63bvOGSSOsXsM4BkG4Km qm0uaYSmF/ZUDe92e6Lu7GUym4XLtB/+gTD+F+B4Fhh69AMtnfRMsmVaZyQ9Wun0 bcP1XpawnlU4SCPh2+HF2jNx6VzSRftVRj7eb84BPG8sKiRDH7v91Y= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; s=default; bh=SaAGpKHeGjGvCIQK1jZNP1PiiS0=; b=E3OsaZ03kSRYlO9TTWI21vUcNNeA sUttMPb/lXjrN0ROcOYcI1AlZ9Wfazt+VZe1xeMM2ZEjlhTCo31IfyARu6/BXPZR A3kqixYnhVKfxq9FsSt1um8Ko150pkjJCAA+RqGMIGXd1rk0Qiqrc7D79Q5fCf6A TnS3pc1eCf2K3vs= Received: (qmail 11613 invoked by alias); 5 Dec 2018 22:25:38 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 11440 invoked by uid 89); 5 Dec 2018 22:25:37 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NEUTRAL autolearn=ham version=3.3.2 spammy=rename, mach, Rename, HContent-Transfer-Encoding:8bit X-HELO: hera.aquilenet.fr From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault Subject: [PATCH] hurd: Fix linknamespace of spawni Date: Wed, 5 Dec 2018 23:25:28 +0100 Message-Id: <20181205222528.25579-2-samuel.thibault@ens-lyon.org> In-Reply-To: <20181205222528.25579-1-samuel.thibault@ens-lyon.org> References: <20181205222528.25579-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 * include/unistd.h (__confstr): Add prototype and hidden prototype. * posix/confstr.c (confstr): Rename to __confstr. (__confstr): Add hidden def. (confstr): Add weak alias for __confstr. * sysdeps/mach/hurd/spawni.c (__spawni): Call __confstr instead of confstr. --- ChangeLog | 9 +++++++++ include/unistd.h | 2 ++ posix/confstr.c | 4 +++- sysdeps/mach/hurd/spawni.c | 4 ++-- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/include/unistd.h b/include/unistd.h index a171b00326..a043431ecf 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -6,6 +6,8 @@ libc_hidden_proto (_exit, __noreturn__) rtld_hidden_proto (_exit, __noreturn__) libc_hidden_proto (alarm) +extern size_t __confstr (int name, char *buf, size_t len); +libc_hidden_proto (__confstr) libc_hidden_proto (confstr) libc_hidden_proto (execl) libc_hidden_proto (execle) diff --git a/posix/confstr.c b/posix/confstr.c index de4cff76cc..73ebb2e254 100644 --- a/posix/confstr.c +++ b/posix/confstr.c @@ -29,7 +29,7 @@ of BUF with the value corresponding to NAME and zero-terminate BUF. Return the number of bytes required to hold NAME's entire value. */ size_t -confstr (int name, char *buf, size_t len) +__confstr (int name, char *buf, size_t len) { const char *string = ""; size_t string_len = 1; @@ -289,4 +289,6 @@ confstr (int name, char *buf, size_t len) } return string_len; } +libc_hidden_def (__confstr) libc_hidden_def (confstr) +weak_alias (__confstr, confstr) diff --git a/sysdeps/mach/hurd/spawni.c b/sysdeps/mach/hurd/spawni.c index b98e991d3b..ecc21d2a57 100644 --- a/sysdeps/mach/hurd/spawni.c +++ b/sysdeps/mach/hurd/spawni.c @@ -629,10 +629,10 @@ __spawni (pid_t *pid, const char *file, /* There is no `PATH' in the environment. The default search path is the current directory followed by the path `confstr' returns for `_CS_PATH'. */ - len = confstr (_CS_PATH, (char *) NULL, 0); + len = __confstr (_CS_PATH, (char *) NULL, 0); path = (char *) __alloca (1 + len); path[0] = ':'; - (void) confstr (_CS_PATH, path + 1, len); + (void) __confstr (_CS_PATH, path + 1, len); } len = strlen (file) + 1;