From patchwork Tue Apr 23 22:12:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1089806 X-Patchwork-Delegate: petr.vorel@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44pd4M2lhGz9sMQ for ; Wed, 24 Apr 2019 08:13:04 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 33807294AB4 for ; Wed, 24 Apr 2019 00:12:59 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [IPv6:2001:4b78:1:20::2]) by picard.linux.it (Postfix) with ESMTP id D9A1B294A80 for ; Wed, 24 Apr 2019 00:12:57 +0200 (CEST) Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by in-2.smtp.seeweb.it (Postfix) with ESMTPS id B290A600258 for ; Wed, 24 Apr 2019 00:12:56 +0200 (CEST) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id B6E94AD47; Tue, 23 Apr 2019 22:12:55 +0000 (UTC) From: Petr Vorel To: ltp@lists.linux.it Date: Wed, 24 Apr 2019 00:12:44 +0200 Message-Id: <20190423221244.27287-1-pvorel@suse.cz> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-2.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=-0.0 required=7.0 tests=SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-2.smtp.seeweb.it Subject: [LTP] [PATCH 1/1] preadv, pwritev: Fix preadv and pwritev link errors on android X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" From: Petr Vorel pwritev() declaration on in bionic C library is guarded with __USE_GNU, therefore define _GNU_SOURCE. This fixes link errors implicit declaration errors. Signed-off-by: Petr Vorel Reviewed-by: Steve Muckle Acked-by: Xiao Yang Acked-by: Xiao Yang <yangx.jy@cn.fujitsu.com> --- Hi, this is IMHO better than adding -D_GNU_SOURCE into CFLAGS. Kind regards, Petr --- testcases/kernel/syscalls/preadv/preadv01.c | 2 ++ testcases/kernel/syscalls/preadv/preadv02.c | 2 ++ testcases/kernel/syscalls/pwritev/pwritev02.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/testcases/kernel/syscalls/preadv/preadv01.c b/testcases/kernel/syscalls/preadv/preadv01.c index 0565a086b..2b4ad5e20 100644 --- a/testcases/kernel/syscalls/preadv/preadv01.c +++ b/testcases/kernel/syscalls/preadv/preadv01.c @@ -23,6 +23,8 @@ * and after reading the file, the file offset is not changed. */ +#define _GNU_SOURCE + #include #include diff --git a/testcases/kernel/syscalls/preadv/preadv02.c b/testcases/kernel/syscalls/preadv/preadv02.c index af1c3b0c4..9935e3835 100644 --- a/testcases/kernel/syscalls/preadv/preadv02.c +++ b/testcases/kernel/syscalls/preadv/preadv02.c @@ -38,6 +38,8 @@ * 8) preadv(2) should return -1 and set errno to ESPIPE. */ +#define _GNU_SOURCE + #include #include #include "tst_test.h" diff --git a/testcases/kernel/syscalls/pwritev/pwritev02.c b/testcases/kernel/syscalls/pwritev/pwritev02.c index 2e6dbab57..9d8ff8725 100644 --- a/testcases/kernel/syscalls/pwritev/pwritev02.c +++ b/testcases/kernel/syscalls/pwritev/pwritev02.c @@ -36,6 +36,8 @@ * 7) pwritev(2) should return -1 and set errno to ESPIPE. */ +#define _GNU_SOURCE + #include #include #include "tst_test.h"