t/io_uring: check for CONFIG_HAVE_GETTID
authorJens Axboe <axboe@kernel.dk>
Thu, 12 Dec 2019 19:34:50 +0000 (12:34 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 12 Dec 2019 19:34:50 +0000 (12:34 -0700)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
t/io_uring.c

index 62dee8058a5922b673a4e5c92c65add6735f4574..c2e5e0989ee9a4f84096f95def112b38e1b41153 100644 (file)
@@ -133,10 +133,12 @@ static int io_uring_enter(struct submitter *s, unsigned int to_submit,
                        min_complete, flags, NULL, 0);
 }
 
+#ifndef CONFIG_HAVE_GETTID
 static int gettid(void)
 {
        return syscall(__NR_gettid);
 }
+#endif
 
 static unsigned file_depth(struct submitter *s)
 {