Message ID | 20200112120216.14.Ic29632a2599ba5f6d287e5ac8491d9745979d3e9@changeid |
---|---|
State | Superseded |
Delegated to: | Simon Glass |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Uvrdy9MZ; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47wmVh5Jvnz9s4Y for <incoming@patchwork.ozlabs.org>; Mon, 13 Jan 2020 06:09:32 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 65B1C817F6; Sun, 12 Jan 2020 20:07:33 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Uvrdy9MZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C8F49817D4; Sun, 12 Jan 2020 20:07:19 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E8DD3804C1 for <u-boot@lists.denx.de>; Sun, 12 Jan 2020 20:07:15 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd41.google.com with SMTP id x1so7255943iop.7 for <u-boot@lists.denx.de>; Sun, 12 Jan 2020 11:07:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eFuSostBI6UC7V9voamizo5Rb+fEamkQXZhUm5q7PqA=; b=Uvrdy9MZIFqIsS/8wG8opCYHEk9cpnAFi5oyCnorLL464aDboZ3/Za1MAdc3YFjgxP g9v3EhfUg4wh5FbwOZl0+8haZFsiTxUAwMG0zOg/szH7bkdtwzb38Inx3LygdxxtQzoz eh85XVIYCNPFCvcIUE1zT5PP5eYuef9oy6vvg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eFuSostBI6UC7V9voamizo5Rb+fEamkQXZhUm5q7PqA=; b=lRRyLBY+NNuiS0w4WfvhUvi9Am/jCbx+Iwx7rhh0E3ChalY6VhLN8t32szzNnbwkgP Vtb2mHE0KWiXqFN+FGwMd3RscnhABMcboL/h+pA69ZI3Gxmoa3hOv1FI6mpoHO8I5M49 a2+U+5ZtRPD+eFa+Hh6DFpFrh5fiRD7SrxtXE/08qNqAoxtyDvywPnoJHCDx9lJhV/Iy BZD56n61ChLCVmXTc7AVb6XP+4bnyXzJ6mKHClpLyAOfWT8qB7D56a32lfIIAmxx1Rer OAE2htG/P6+i4efK0Hz6Wwug+jzWuHBCOoK8nVR61NDet966K/FC3F3DGnddKXzbaIas VqLA== X-Gm-Message-State: APjAAAVsOYe9NDrAMPeM7eDNbJTwOE88WBWA7Wbeeg+dlSFk1j1RytVj +VoRsbXL0lVFKouB/4CMi0zAaWhDPV8= X-Google-Smtp-Source: APXvYqxS71qD5oUarYJfVq3uoANbpmdBL9fvXs94mkLjYdemNkTVQ6iDuHoKpritpB73t0Qu1ExSkg== X-Received: by 2002:a5e:8b06:: with SMTP id g6mr9795104iok.61.1578856034772; Sun, 12 Jan 2020 11:07:14 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id r22sm3039219ilb.25.2020.01.12.11.07.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jan 2020 11:07:14 -0800 (PST) From: Simon Glass <sjg@chromium.org> To: U-Boot Mailing List <u-boot@lists.denx.de> Subject: [PATCH 14/33] string: Allow arch override of strndup() also Date: Sun, 12 Jan 2020 12:06:05 -0700 Message-Id: <20200112120216.14.Ic29632a2599ba5f6d287e5ac8491d9745979d3e9@changeid> X-Mailer: git-send-email 2.25.0.rc1.283.g88dfdc4193-goog In-Reply-To: <20200112190624.79077-1-sjg@chromium.org> References: <20200112190624.79077-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Cc: Thierry Reding <treding@nvidia.com>, Tom Warren <twarren@nvidia.com> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean |
Series |
sandbox: Move to SDL2
|
expand
|
diff --git a/include/linux/string.h b/include/linux/string.h index 5d63be4ce5..bb1d5ab07e 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -93,8 +93,8 @@ size_t strcspn(const char *s, const char *reject); #ifndef __HAVE_ARCH_STRDUP extern char * strdup(const char *); -#endif extern char * strndup(const char *, size_t); +#endif #ifndef __HAVE_ARCH_STRSWAB extern char * strswab(const char *); #endif diff --git a/lib/string.c b/lib/string.c index 9b779ddc3b..ae7835f600 100644 --- a/lib/string.c +++ b/lib/string.c @@ -324,7 +324,6 @@ char * strdup(const char *s) strcpy (new, s); return new; } -#endif char * strndup(const char *s, size_t n) { @@ -348,6 +347,7 @@ char * strndup(const char *s, size_t n) return new; } +#endif #ifndef __HAVE_ARCH_STRSPN /**
At present architectures can override strdup() but not strndup(). Use the same option for both. Signed-off-by: Simon Glass <sjg@chromium.org> --- include/linux/string.h | 2 +- lib/string.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)