From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751091AbcGMHOG (ORCPT ); Wed, 13 Jul 2016 03:14:06 -0400 Received: from terminus.zytor.com ([198.137.202.10]:41160 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751232AbcGMHNx (ORCPT ); Wed, 13 Jul 2016 03:13:53 -0400 Date: Wed, 13 Jul 2016 00:13:43 -0700 From: tip-bot for Arnaldo Carvalho de Melo Message-ID: Cc: adrian.hunter@intel.com, wangnan0@huawei.com, namhyung@kernel.org, Alexey.Brodkin@synopsys.com, dsahern@gmail.com, acme@redhat.com, hpa@zytor.com, tglx@linutronix.de, jolsa@kernel.org, vgupta@synopsys.com, linux-kernel@vger.kernel.org, mingo@kernel.org Reply-To: Alexey.Brodkin@synopsys.com, dsahern@gmail.com, namhyung@kernel.org, adrian.hunter@intel.com, wangnan0@huawei.com, mingo@kernel.org, jolsa@kernel.org, linux-kernel@vger.kernel.org, vgupta@synopsys.com, hpa@zytor.com, tglx@linutronix.de, acme@redhat.com To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] tools lib: Guard the strlcpy() header with __GLIBC__ Git-Commit-ID: 61a6445e463a3152590352d8634131955f531c6e X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 61a6445e463a3152590352d8634131955f531c6e Gitweb: http://git.kernel.org/tip/61a6445e463a3152590352d8634131955f531c6e Author: Arnaldo Carvalho de Melo AuthorDate: Fri, 8 Jul 2016 15:38:51 -0300 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 12 Jul 2016 15:20:29 -0300 tools lib: Guard the strlcpy() header with __GLIBC__ Better to whitelist it for libraries that require it (glibc) than blacklist it with the ones that don't (uclibc, musl libc, etc). Cc: Adrian Hunter Cc: Alexey Brodkin Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Vineet Gupta Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-52ih0m63a2n63tanpy6yj682@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/include/linux/string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/include/linux/string.h b/tools/include/linux/string.h index b466d02..b968794 100644 --- a/tools/include/linux/string.h +++ b/tools/include/linux/string.h @@ -8,7 +8,7 @@ void *memdup(const void *src, size_t len); int strtobool(const char *s, bool *res); -#ifndef __UCLIBC__ +#ifdef __GLIBC__ extern size_t strlcpy(char *dest, const char *src, size_t size); #endif