Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3451074pxk; Mon, 5 Oct 2020 09:58:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxf2kZGdF9h0giSIduFufYSoZJpwVA6UkGmwP2VQG80bCIc89W80xsEVRAjo/gYil1aEmVE X-Received: by 2002:a50:d61e:: with SMTP id x30mr640429edi.70.1601917089480; Mon, 05 Oct 2020 09:58:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601917089; cv=none; d=google.com; s=arc-20160816; b=I9lNb5bL4RZ2LDfThSLYaDxnYi9iiYXx/cJW/Qr7c8oNJuZcuW3098lcAjb1uwvpzh 6uJSN6Em5evcu6nDYor9HcMhXrWdyfpw/Y6eRTVZAZJ8r5MaOdG6QBQXJrwW8cfKrhNX 3otuoUb+ZZnYBzLmLZ9CfjlTWzouoHEaNOoP7llORb8OY3WOfRR7UnkY25LTQRAoi6I/ 68hjv5T3z4zGhL2lv1JuKDIhZGGf4wWBAfZqGRQ1PDoivz+93H47fK1QQOUWHqIihbgc Kv1uxkxMjAGtKK8AASiv6x/dVXl+rylk6BDTlS2DYRQ5OMTDUwdDtzPcIU+m+sbgpfeb kthQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=csQq4W9ZUY0dHwx4eh/MJMeih7VWS7KKj/8FrOA6ZWA=; b=cjU1Wvoi3GeqBlteTyUXirwFRpJjWR+2YT7CjZATPrl+/H/ZE6ql6kHsZuMu8jNWQS ZZStdvMOH4AWeYSS/8PTx+YRxxy9N64UAYjGOPnF1AbXhBD/AEyUc/bhRLTCA5ubD94W g9uSSCrCSLPM3/SIXQ6CyTmFdicB5OZ3qmEoQD/uMgrpcwuuxZBNhCmBG1oypEmgpVzE AORGP1smAL4YP4oxq86hWiEq2MfK25Ywltc3S8K/o5v72JDt3FCXHEtWnWDDjlTh3tUe BHcccuM25mOEOHffzpo6wcn8CZoTNwjlJd4suQAKQ+T5tMx7aDhvSCNlbbzfp/tRQ4oR it7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=puGxeI6x; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id kt25si116318ejb.438.2020.10.05.09.57.46; Mon, 05 Oct 2020 09:58:09 -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=puGxeI6x; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728241AbgJEPeE (ORCPT + 99 others); Mon, 5 Oct 2020 11:34:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:34050 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728192AbgJEPds (ORCPT ); Mon, 5 Oct 2020 11:33:48 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 51AA620B80; Mon, 5 Oct 2020 15:33:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601912027; bh=Ztzrl0avbblWlwhorgBTnlg2D2PPMnM5Y/dAUXeG29I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=puGxeI6xss2G0axNgXf/G4KhCtOkf8WtNmxJCyLO0b+7/f5dRCz9qcZHdBHijPqXa WhpeWkHUkloTFJ7kH6Nbvo1rW8WOy6hIRiCpVU072o4DjCbR+KTh8e+U/305uZ6WCZ bt+gTXLCz4TIVIWMQWzbenZzOfa2pZUKbe5TEQ1g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Douglas Gilbert , Jens Axboe , Sasha Levin Subject: [PATCH 5.8 42/85] tools/io_uring: fix compile breakage Date: Mon, 5 Oct 2020 17:26:38 +0200 Message-Id: <20201005142116.759062131@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201005142114.732094228@linuxfoundation.org> References: <20201005142114.732094228@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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