Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3443281pxk; Mon, 28 Sep 2020 18:39:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhYIqwGvxOPorxR18ev8xOKSeHbLJvsGiCP6zXXXsHvK4lHF85bJs18f0BN/k6doFcPeEM X-Received: by 2002:a17:906:e4f:: with SMTP id q15mr1562316eji.155.1601343552106; Mon, 28 Sep 2020 18:39:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601343552; cv=none; d=google.com; s=arc-20160816; b=09ODT/GEmGMkQhP6DJAQRRuzooA0WBXw7JqbtLow2LfmTWgNXsDvp87hiJqrDz8kIk WYjfrR9LFo+E83kgi5/oo4SKdlAiY66RqhYlkSMdnm2jA2OWZDAtfxw9zZSbPvyYrxv1 zKFZx2hslD5X4x2JpL+EFjcRI/lCYxpb7STP2tQVrFnvGR1Jh3ZWUl4dQTNMVci6f7q9 ngHP5DDJIG9WmViCqtXJWRLJEQQoAah32ZSKhKfXHDe86RxX4mCOO//WeA7LITtRFmUE mecHS3zz3J0Fb3jR1CtO97NI/Iql4zfznVjnk4OIuILNu4pnNUYnRtOTnIkdKQQJGujJ V2lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=csQq4W9ZUY0dHwx4eh/MJMeih7VWS7KKj/8FrOA6ZWA=; b=BJLewHyczzPDqRd6hfoQxf8hpXWfFHbH0MWFdu773aUO8+yfLAX6XWCvyP0XFW4KLR 0Ci4iKV/XJox5ufodHPfSm4Ws8fp5zYLWkKtMRRyKuPcgiXAUs5l5huVn+CBQf2/tQZt BfV6tSqyWUDcREQ4VEgtHcYOYlS5Vj6EllWms3eAyXnp8+wrspnuNzVLoHFf3xnYOIQS UbsjBeWAwlM2u1qNAkt0VkrY+iGKWlYapo67+kOPNYhLawxUif5K7nR0tQNNjRJyZoty s150tSTFGmYqyhZ26ZmI/ENr2W9PrTtpK5DlMBDAN9dAE8VcWmCAtn+9VEOjDnD3Qc9P l3xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=txWQCi7y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id s19si1859833edx.480.2020.09.28.18.38.42; Mon, 28 Sep 2020 18:39:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=txWQCi7y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728117AbgI2Bf7 (ORCPT + 99 others); Mon, 28 Sep 2020 21:35:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:39986 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727444AbgI2Baz (ORCPT ); Mon, 28 Sep 2020 21:30:55 -0400 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 0D03C2184D; Tue, 29 Sep 2020 01:30:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601343054; bh=Ztzrl0avbblWlwhorgBTnlg2D2PPMnM5Y/dAUXeG29I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=txWQCi7yybnk1E3gahoRjpoexzbzIzorn9WK4SdAm9SlrIdUXWcVbrldpiBOK6hdc ZMcAFo6cQLBhqLgfm86t7FEXZH+AS34Vb66voRbWMerki93VGdtFPc6DyiUP0BE7PF DlOerzn51eL1DBCPBgzRzSnwrpmsbedjaQ3LxypA= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Douglas Gilbert , Jens Axboe , Sasha Levin Subject: [PATCH AUTOSEL 5.8 21/29] tools/io_uring: fix compile breakage Date: Mon, 28 Sep 2020 21:30:18 -0400 Message-Id: <20200929013027.2406344-21-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200929013027.2406344-1-sashal@kernel.org> References: <20200929013027.2406344-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Douglas Gilbert [ Upstream commit 72f04da48a9828ba3ae8ac77bea648bda8b7d0ff ] It would seem none of the kernel continuous integration does this: $ cd tools/io_uring $ make Otherwise it may have noticed: cc -Wall -Wextra -g -D_GNU_SOURCE -c -o io_uring-bench.o io_uring-bench.c io_uring-bench.c:133:12: error: static declaration of ‘gettid’ follows non-static declaration 133 | static int gettid(void) | ^~~~~~ In file included from /usr/include/unistd.h:1170, from io_uring-bench.c:27: /usr/include/x86_64-linux-gnu/bits/unistd_ext.h:34:16: note: previous declaration of ‘gettid’ was here 34 | extern __pid_t gettid (void) __THROW; | ^~~~~~ make: *** [: io_uring-bench.o] Error 1 The problem on Ubuntu 20.04 (with lk 5.9.0-rc5) is that unistd.h already defines gettid(). So prefix the local definition with "lk_". Signed-off-by: Douglas Gilbert Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- tools/io_uring/io_uring-bench.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/io_uring/io_uring-bench.c b/tools/io_uring/io_uring-bench.c index 0f257139b003e..7703f01183854 100644 --- a/tools/io_uring/io_uring-bench.c +++ b/tools/io_uring/io_uring-bench.c @@ -130,7 +130,7 @@ static int io_uring_register_files(struct submitter *s) s->nr_files); } -static int gettid(void) +static int lk_gettid(void) { return syscall(__NR_gettid); } @@ -281,7 +281,7 @@ static void *submitter_fn(void *data) struct io_sq_ring *ring = &s->sq_ring; int ret, prepped; - printf("submitter=%d\n", gettid()); + printf("submitter=%d\n", lk_gettid()); srand48_r(pthread_self(), &s->rand); -- 2.25.1