From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751858AbcGMHNf (ORCPT ); Wed, 13 Jul 2016 03:13:35 -0400 Received: from terminus.zytor.com ([198.137.202.10]:41136 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751250AbcGMHNd (ORCPT ); Wed, 13 Jul 2016 03:13:33 -0400 Date: Wed, 13 Jul 2016 00:13:18 -0700 From: tip-bot for Arnaldo Carvalho de Melo Message-ID: Cc: jolsa@kernel.org, acme@redhat.com, tglx@linutronix.de, rostedt@goodmis.org, adrian.hunter@intel.com, dsahern@gmail.com, namhyung@kernel.org, linux-kernel@vger.kernel.org, mingo@kernel.org, wangnan0@huawei.com, hpa@zytor.com Reply-To: linux-kernel@vger.kernel.org, mingo@kernel.org, hpa@zytor.com, wangnan0@huawei.com, namhyung@kernel.org, acme@redhat.com, tglx@linutronix.de, rostedt@goodmis.org, adrian.hunter@intel.com, dsahern@gmail.com, jolsa@kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] tools lib api fs: Use str_error_r() Git-Commit-ID: b31e3e3316a78e4a2cf23be8e0d47e5e5a025bde 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: b31e3e3316a78e4a2cf23be8e0d47e5e5a025bde Gitweb: http://git.kernel.org/tip/b31e3e3316a78e4a2cf23be8e0d47e5e5a025bde Author: Arnaldo Carvalho de Melo AuthorDate: Fri, 8 Jul 2016 15:26:50 -0300 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 12 Jul 2016 15:20:29 -0300 tools lib api fs: Use str_error_r() To make it portable to non-glibc systems, that follow the XSI variant instead of the GNU specific one that gets in place when _GNU_SOURCE is defined. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-mixgnh3iyajuqogn2opsocdy@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/lib/api/Makefile | 1 + tools/lib/api/fs/tracing_path.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/lib/api/Makefile b/tools/lib/api/Makefile index c7ceea6..0a6fda9 100644 --- a/tools/lib/api/Makefile +++ b/tools/lib/api/Makefile @@ -26,6 +26,7 @@ endif CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 CFLAGS += -I$(srctree)/tools/lib/api +CFLAGS += -I$(srctree)/tools/include RM = rm -f diff --git a/tools/lib/api/fs/tracing_path.c b/tools/lib/api/fs/tracing_path.c index a26bb5e..251b7c3 100644 --- a/tools/lib/api/fs/tracing_path.c +++ b/tools/lib/api/fs/tracing_path.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include "fs.h" @@ -118,7 +119,7 @@ static int strerror_open(int err, char *buf, size_t size, const char *filename) } break; default: - snprintf(buf, size, "%s", strerror_r(err, sbuf, sizeof(sbuf))); + snprintf(buf, size, "%s", str_error_r(err, sbuf, sizeof(sbuf))); break; }