Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2476691pxk; Mon, 14 Sep 2020 14:39:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQVe95mj8zJu0cgn0ccVp4UssQRFf3QBWK2/0OV/S4/8t4yPaameBsG6xTepPn5ZLH2zsL X-Received: by 2002:a17:906:455:: with SMTP id e21mr17543443eja.170.1600119575105; Mon, 14 Sep 2020 14:39:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600119575; cv=none; d=google.com; s=arc-20160816; b=UHRjN2p2ieW+taUPQvN82gylVSqr4ajqNn3peWRdNyYCb5xx+600aKKrdcwg5FC2OU lF6vqDWYag+HptJsBznrrEn8N7LWeNj+35eTmeEFEvq8jlkZ8dZFrCyykvuEjuwa9V5g 7x4GRaZ6MWdx4rNOV2/v5AEq3eXJzjpZLdl7PTya+7MNTexoUtqQM5T58sjTp3sxUlFj 28w5oUmYj7HGtd04t98mZPdmi+GxnamcvmOqoXbmSCpj5Zc8ROUnb5/lZK/9LqJgxss4 2V9XBp117UNWzRYl1wMp8/w0/bG5h/FfnzFiyYmINVNZJ9QTPADEtV1EUYdbNMptGk0O 2U+w== 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 :message-id:date:subject:cc:to:from; bh=RxjJyvCXFnnQHYRU0LpDUOEJ5pjk47owVRKhMFv0k80=; b=dTLlmlGE5CL8cvFCMe6CbrQiUuYValF3NRqp7WET7LAn7AH4OKxxDKpZzU2YmNmUX8 Tclcm8cd2vrXQ+2op71ke2eICoF/wWZCoggkvv828hhkbCUBx6TGsIXAGdF1qgAy3Pn2 q3DerBbWPNJ36Bztin571w4EWYA4x2VIR55n64cvXCRLeoQz65N3aJfTGqiIowYvFGJ2 vzzovXcB7CBqfKNqq7GqvnM2sTMajDhS5xHeB9KkBQHg6DcvaTVAN9aZSd/4GhbZHOJC m5VMEmx6W7izWw5g7qFceC3T+fOaSb35mc92Z93YYpah03+Ie9W3Vo84bl7zIObW2OSZ AG9g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cq27si8016466edb.415.2020.09.14.14.39.12; Mon, 14 Sep 2020 14:39:35 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726024AbgINVgY (ORCPT + 99 others); Mon, 14 Sep 2020 17:36:24 -0400 Received: from smtp.infotech.no ([82.134.31.41]:55713 "EHLO smtp.infotech.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725953AbgINVgY (ORCPT ); Mon, 14 Sep 2020 17:36:24 -0400 Received: from localhost (localhost [127.0.0.1]) by smtp.infotech.no (Postfix) with ESMTP id B8EF52041CB; Mon, 14 Sep 2020 23:36:19 +0200 (CEST) X-Virus-Scanned: by amavisd-new-2.6.6 (20110518) (Debian) at infotech.no Received: from smtp.infotech.no ([127.0.0.1]) by localhost (smtp.infotech.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3vys0KX8cFqd; Mon, 14 Sep 2020 23:36:12 +0200 (CEST) Received: from xtwo70.bingwo.ca (host-45-78-251-166.dyn.295.ca [45.78.251.166]) by smtp.infotech.no (Postfix) with ESMTPA id 1DE0220417A; Mon, 14 Sep 2020 23:36:11 +0200 (CEST) From: Douglas Gilbert To: linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, axboe@kernel.dk Subject: [PATCH] tools/io_uring: fix compile breakage Date: Mon, 14 Sep 2020 17:36:09 -0400 Message-Id: <20200914213609.141577-1-dgilbert@interlog.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 0f257139b003..7703f0118385 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