From: Xiao Yang <yangx.jy@cn.fujitsu.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/1] preadv, pwritev: Fix preadv and pwritev link errors on android
Date: Wed, 24 Apr 2019 16:17:12 +0800 [thread overview]
Message-ID: <5CC01B88.9040802@cn.fujitsu.com> (raw)
In-Reply-To: <20190423221244.27287-1-pvorel@suse.cz>
Hi Petr,
LGTM.
Acked-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Best Regards,
Xiao Yang
On 2019/04/24 6:12, Petr Vorel wrote:
> From: Petr Vorel<petr.vorel@gmail.com>
>
> 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<petr.vorel@gmail.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<string.h>
> #include<sys/uio.h>
>
> 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<sys/uio.h>
> #include<unistd.h>
> #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<sys/uio.h>
> #include<unistd.h>
> #include "tst_test.h"
next prev parent reply other threads:[~2019-04-24 8:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-23 22:12 [LTP] [PATCH 1/1] preadv, pwritev: Fix preadv and pwritev link errors on android Petr Vorel
2019-04-24 0:01 ` Steve Muckle
2019-04-24 8:17 ` Xiao Yang [this message]
2019-04-24 8:23 ` Petr Vorel
2019-04-24 8:28 ` =?unknown-8bit?b?6Ziu5q2j5pe6?=
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5CC01B88.9040802@cn.fujitsu.com \
--to=yangx.jy@cn.fujitsu.com \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.