diff options
author | Baruch Siach <baruch@tkos.co.il> | 2018-03-13 13:06:12 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2018-03-14 07:31:20 +0100 |
commit | 7329d231e0fc1c5c862722373be1c7fde946ed72 (patch) | |
tree | b0bcc5be681d15fb748c756875de79459f449fd4 | |
parent | c6d62cbc60504c7f6867b486248b0ef7cc2da554 (diff) |
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 <baruch@tkos.co.il>
-rw-r--r-- | test/misc/tst-syscall6.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/misc/tst-syscall6.c b/test/misc/tst-syscall6.c index fa51c27..9ad2dda 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]; |