Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5131151imu; Tue, 8 Jan 2019 12:05:21 -0800 (PST) X-Google-Smtp-Source: ALg8bN5h69ebAf0OZad5QtiWj4g49zwdgAEde0vuxUwQ4LYCXIKWb0UVwwzNcR7gnf17aPW2pzUd X-Received: by 2002:a63:db48:: with SMTP id x8mr2631574pgi.365.1546977921117; Tue, 08 Jan 2019 12:05:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546977921; cv=none; d=google.com; s=arc-20160816; b=D7byKdWYzM9S3MvP9cxjCpp8V1dvE+0fteS74sOXfTnbSTm0/D7qBJL6eWbM1VnbMP 0Q30kB+3htcv68r0cZ2GvclJCYAlZHcvjKsTqrMwNe0VF3Uo7lcN6eFJpL53/qTUHaAh qTnaSeH7Pte9MnZZSPr8q15bN5Hih6oxW+rn6WsFpvoR1/7hyWLWoVfNxpDAng0Havqp 9v7y1d7krEdtwTPdmRmL4U1VhCi1XA6y9D1uokCYPvPtgUpsY7OHS/DnKPlyoKGgMjLc WC6vQ6V9cITjg2x/0kVR49X+sY2/yUCCCEn4EzfZb8Doj7fCwVyKkR2SDdDyTijm70cv FnYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0pUgtRkgJY4WIvoZr+q2yCh/Cg6vdMxi3OoBjTXzx6U=; b=BNOUWICqKKGeUrBrkVopb80AF4m+4tp94R/RQLK5I0k9Rhpm7sRBoPC844UIK/OJfQ zvjVxQuemVhvumOkBcKpziRxR5WeKkk1ni5BJRgCxRhw++axw1AeKEI//XzAn1MwtZCt xk8TOxEz/tJ3dDqC6/mWHGD3J4D5z6FHZJItr9XoVDSXHfKdgenCFq1OYQMBCkqVBRGF pVoj03J/xUSrz3TtRqDL6lLBdZnUzopN/mYceY3bsJbCl8Sp9zezb2hnCrX6mviCmU3q xepPc7ZAthmaVI6cfY8JGKebznfSa5ZUw9+YK6clhJZh98vmxLk+KULFj7YvzWV+2tod 7c8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=L0V92El1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u123si6680680pgb.516.2019.01.08.12.05.05; Tue, 08 Jan 2019 12:05:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=L0V92El1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730511AbfAHUB4 (ORCPT + 99 others); Tue, 8 Jan 2019 15:01:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:36404 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730323AbfAHT3K (ORCPT ); Tue, 8 Jan 2019 14:29:10 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 59C7120645; Tue, 8 Jan 2019 19:29:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1546975750; bh=XUS7PF6pZ50B8RMHl+TuW+6xE/bctCgX4LVNPTtm69g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L0V92El14jxTBZoNiMR89nMkHMGUGTIeAYPf01INW1cCuYWEysX1V8VWonIv+u4fr dY2y77wzwaK3BEVMrbzKeWhGAhTIL/TXv4jhW/7mLPIoCuGjYwXzr1b+xxFXQJIlz4 LL1U46sqUjrV42lY8skXloBSwAEYYcIdDGj8+FqU= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Arnaldo Carvalho de Melo , Adrian Hunter , Jiri Olsa , Namhyung Kim , Sasha Levin Subject: [PATCH AUTOSEL 4.20 094/117] perf tools: Add missing sigqueue() prototype for systems lacking it Date: Tue, 8 Jan 2019 14:26:02 -0500 Message-Id: <20190108192628.121270-94-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190108192628.121270-1-sashal@kernel.org> References: <20190108192628.121270-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnaldo Carvalho de Melo [ Upstream commit 748fe0889c1ff12d378946bd5326e8ee8eacf5cf ] There are systems such as the Android NDK API level 24 has the sigqueue() function but doesn't provide a prototype, adding noise to the build: util/evlist.c: In function 'perf_evlist__prepare_workload': util/evlist.c:1494:4: warning: implicit declaration of function 'sigqueue' [-Wimplicit-function-declaration] if (sigqueue(getppid(), SIGUSR1, val)) ^ util/evlist.c:1494:4: warning: nested extern declaration of 'sigqueue' [-Wnested-externs] Define a LACKS_SIGQUEUE_PROTOTYPE define so that code needing that can get a prototype. Checked in the bionic git repo to be available since level 23: https://android.googlesource.com/platform/bionic/+/master/libc/include/signal.h#123 int sigqueue(pid_t __pid, int __signal, const union sigval __value) __INTRODUCED_IN(23); Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-lmhpev1uni9kdrv7j29glyov@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/Makefile.config | 1 + tools/perf/util/evlist.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index a0e8c23f9125..e106e7ce6933 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -294,6 +294,7 @@ ifndef NO_BIONIC $(call feature_check,bionic) ifeq ($(feature-bionic), 1) BIONIC := 1 + CFLAGS += -DLACKS_SIGQUEUE_PROTOTYPE EXTLIBS := $(filter-out -lrt,$(EXTLIBS)) EXTLIBS := $(filter-out -lpthread,$(EXTLIBS)) endif diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 668d2a9ef0f4..8a806b0758b0 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -34,6 +34,10 @@ #include #include +#ifdef LACKS_SIGQUEUE_PROTOTYPE +int sigqueue(pid_t pid, int sig, const union sigval value); +#endif + #define FD(e, x, y) (*(int *)xyarray__entry(e->fd, x, y)) #define SID(e, x, y) xyarray__entry(e->sample_id, x, y) -- 2.19.1