uclibc-ng-test: fix build with musl and older kernel headers
PATCH 1/1 uclibc-ng-test: fix build with musl and older kernel headers
musl libc provides its own system call macros, including preadv2/pwritev2. Having these macros defined is not enough to determine availability of other related macros in kernel headers.
Add a patch to check these macros directly.
Fixes:
http://autobuild.buildroot.net/results/7e9/7e9945f46ef9e0f6de7e1c85b0ca1104df6c86f5/
http://autobuild.buildroot.net/results/782/782652193bb6770ae68d509b3a7087667622d627/
http://autobuild.buildroot.net/results/582/5827a724c7f24218010f4cdd24924dca457b0361/
--- ...scall6-fix-build-with-musl-and-older-kenr.patch | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 package/uclibc-ng-test/0001-misc-tst-syscall6-fix-build-with-musl-and-older-kenr.patch
package/uclibc-ng-test/0001-misc-tst-syscall6-fix-build-with-musl-and-older-kenr.patch new file +45 -0
@@ -0,0 +1,45 @@ +From 9a09c89fdd0e0cebec48d1bb7bc187bf92ae361c Mon Sep 17 00:00:00 2001 +From: Baruch Siach <[email protected]> +Date: Tue, 13 Mar 2018 12:58:59 +0200 +Subject: [PATCH] misc/tst-syscall6: fix build with musl and older kenrel + headers + +The RWF_DSYNC and RWF_HIPRI macros were introduced in kernel version 4.6 +with the preadv2/pwritev2 system calls. musl libc provides its own +syscall definitions, even when the kernel headers are older. This leads +to the following build failure: + +tst-syscall6.c: In function 'main': +tst-syscall6.c:32:48: error: 'RWF_DSYNC' undeclared (first use in this function) + nio = syscall(SYS_pwritev2, fd, iov, 2, 0, 0, RWF_DSYNC); + ^~~~~~~~~ +tst-syscall6.c:32:48: note: each undeclared identifier is reported only once for each function it appears in +tst-syscall6.c:42:58: error: 'RWF_HIPRI' undeclared (first use in this function) + nio = syscall(SYS_preadv2, fd, iov, 1, strlen(str0), 0, RWF_HIPRI); + ^~~~~~~~~ + +Make the code depend also on RWF_HIPRI to fix this failure. + +Signed-off-by: Baruch Siach <[email protected]> +--- +Upstream status: patch sent to Waldemar Brodkorb <[email protected]> + + test/misc/tst-syscall6.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/misc/tst-syscall6.c b/test/misc/tst-syscall6.c +index fa51c275e4a5..9ad2ddac2b8f 100644 +--- a/test/misc/tst-syscall6.c ++++ b/test/misc/tst-syscall6.c +@@ -9,7 +9,7 @@ + + int main() + { +-#if defined SYS_preadv2 && defined SYS_pwritev2 ++#if defined SYS_preadv2 && defined SYS_pwritev2 && defined RWF_HIPRI + char tmp[] = "/tmp/tst-preadv2-XXXXXX"; + int fd; + struct iovec iov[2]; +-- +2.16.1 +
Signature · 1 line
2.16.1
PATCH 1/1 uclibc-ng-test: fix build with musl and older kernel headers
Hi Baruch,
Baruch Siach wrote,
Quoted 3 lines
musl libc provides its own system call macros, including preadv2/pwritev2. Having these macros defined is not enough to determine availability of other related macros in kernel headers.
Thanks, pushed
best regards
Waldemar
PATCH 1/1 uclibc-ng-test: fix build with musl and older kernel headers
In reply to Baruch SiachQuoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Baruch" == Baruch Siach <[email protected]> writes:
musl libc provides its own system call macros, including preadv2/pwritev2. Having these macros defined is not enough to determine availability of other related macros in kernel headers.
Add a patch to check these macros directly.
Quoted 7 lines
Fixes:
http://autobuild.buildroot.net/results/7e9/7e9945f46ef9e0f6de7e1c85b0ca1104df6c86f5/
http://autobuild.buildroot.net/results/782/782652193bb6770ae68d509b3a7087667622d627/
http://autobuild.buildroot.net/results/582/5827a724c7f24218010f4cdd24924dca457b0361/Cc Waldemar Brodkorb <[email protected]>Signed-off-by Baruch Siach <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 uclibc-ng-test: fix build with musl and older kernel headers
In reply to Baruch SiachQuoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Baruch" == Baruch Siach <[email protected]> writes:
musl libc provides its own system call macros, including preadv2/pwritev2. Having these macros defined is not enough to determine availability of other related macros in kernel headers.
Add a patch to check these macros directly.
Quoted 7 lines
Fixes:
http://autobuild.buildroot.net/results/7e9/7e9945f46ef9e0f6de7e1c85b0ca1104df6c86f5/
http://autobuild.buildroot.net/results/782/782652193bb6770ae68d509b3a7087667622d627/
http://autobuild.buildroot.net/results/582/5827a724c7f24218010f4cdd24924dca457b0361/Cc Waldemar Brodkorb <[email protected]>Signed-off-by Baruch Siach <[email protected]>
Committed to 2018.02.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard