preadv, pwritev: Fix preadv and pwritev link errors on android
PATCH 1/1 preadv, pwritev: Fix preadv and pwritev link errors on android
From: Petr Vorel <[email protected]>
pwritev() declaration on in bionic C library is guarded with __USE_GNU, therefore define _GNU_SOURCE.
This fixes link errors implicit declaration errors.
---
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(+)
testcases/kernel/syscalls/preadv/preadv01.c +2 -0
@@ -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>
testcases/kernel/syscalls/preadv/preadv02.c +2 -0
@@ -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"
testcases/kernel/syscalls/pwritev/pwritev02.c +2 -0
@@ -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"
Signature · 1 line
2.20.1
PATCH 1/1 preadv, pwritev: Fix preadv and pwritev link errors on android
Quoted 61 lines · Petr Vorel
From: Petr Vorel <[email protected]>
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 <[email protected]>---
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(+)testcases/kernel/syscalls/preadv/preadv01.c +2
-0@@ -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> testcases/kernel/syscalls/preadv/preadv02.c +2
-0@@ -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" testcases/kernel/syscalls/pwritev/pwritev02.c +2
-0@@ -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"
PATCH 1/1 preadv, pwritev: Fix preadv and pwritev link errors on android
In reply to Petr VorelHi Petr,
LGTM.
Best Regards,
Xiao Yang
Quoted 60 lines · Petr Vorel
From: Petr Vorel<[email protected]>
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<[email protected]>---
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(+)testcases/kernel/syscalls/preadv/preadv01.c +2
-0@@ -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> testcases/kernel/syscalls/preadv/preadv02.c +2
-0@@ -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" testcases/kernel/syscalls/pwritev/pwritev02.c +2
-0@@ -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"
PATCH 1/1 preadv, pwritev: Fix preadv and pwritev link errors on android
Hi Steve, Xiao,
Quoted 4 lines
Hi Petr,
LGTM.
Acked-by Xiao Yang <[email protected]>
Thanks for your review, pushed.
Kind regards,
Petr
PATCH 1/1 preadv, pwritev: Fix preadv and pwritev link errors on android
Hi Petr,
-------- Original Message --------
From: Petr Vorel
Sent: Wed, 24 Apr 2019 10:23:36 +0200
To: Xiao Yang
Cc: Ltp
Subject: Re: [LTP] [PATCH 1/1] preadv, pwritev: Fix preadv and pwritev link errors on android
Quoted 6 lines
Hi Steve, Xiao,
Quoted 3 lines
Hi Petr,
LGTM.Acked-by Xiao Yang <[email protected]>Thanks for your review, pushed.
This is cool! I also suffered from this issue. :-)
Regards,
Zhengwang
Quoted 3 lines
Kind regards,
Petr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20190424/f184d543/attachment.html>