From ae5d066fea73ba118c75848f6cbbb9c8a108d01c Mon Sep 17 00:00:00 2001 From: GNU Libc Maintainers Date: Fri, 26 Jan 2018 22:35:29 +0000 Subject: [PATCH] git-preadwritev2-3 commit 2263ca7ce8a824f53debcc724bd21cd7099e1161 Author: Samuel Thibault Date: Sun Sep 3 03:03:40 2017 +0200 hurd: Fix p{read,write}{,v64}v2.c build * misc/preadv2.c: Include . * misc/preadv64v2.c: Include . * misc/pwritev2.c: Include . * misc/pwritev64v2.c: Include . * sysdeps/posix/preadv2.c: Include . * sysdeps/posix/preadv64v2.c: Include . Fix inclusion. * sysdeps/posix/pwritev2.c: Include . * sysdeps/posix/pwritev64v2.c: Include . Gbp-Pq: Topic hurd-i386 Gbp-Pq: Name git-preadwritev2-3.diff --- misc/preadv2.c | 1 + misc/preadv64v2.c | 1 + misc/pwritev2.c | 1 + misc/pwritev64v2.c | 1 + misc/tst-preadvwritev2-common.c | 14 +++++++++++++- sysdeps/posix/preadv2.c | 1 + sysdeps/posix/preadv64v2.c | 3 ++- sysdeps/posix/pwritev2.c | 1 + sysdeps/posix/pwritev64v2.c | 1 + 9 files changed, 22 insertions(+), 2 deletions(-) diff --git a/misc/preadv2.c b/misc/preadv2.c index a62dcaa69..fe379401e 100644 --- a/misc/preadv2.c +++ b/misc/preadv2.c @@ -16,6 +16,7 @@ License along with the GNU C Library; if not, see . */ +#include #include /* Same as preadv but with an additional flags argument. */ diff --git a/misc/preadv64v2.c b/misc/preadv64v2.c index a802c2f1a..e0f05a506 100644 --- a/misc/preadv64v2.c +++ b/misc/preadv64v2.c @@ -16,6 +16,7 @@ License along with the GNU C Library; if not, see . */ +#include #include /* Same as preadv64 but with an addional flag argument. */ diff --git a/misc/pwritev2.c b/misc/pwritev2.c index b9e07272d..ead84471f 100644 --- a/misc/pwritev2.c +++ b/misc/pwritev2.c @@ -16,6 +16,7 @@ License along with the GNU C Library; if not, see . */ +#include #include /* Same as pwritev but with an additional flags argument. */ diff --git a/misc/pwritev64v2.c b/misc/pwritev64v2.c index 1f874f054..c72689cc7 100644 --- a/misc/pwritev64v2.c +++ b/misc/pwritev64v2.c @@ -16,6 +16,7 @@ License along with the GNU C Library; if not, see . */ +#include #include /* Same as preadv64 but with an addional flag argument. */ diff --git a/misc/tst-preadvwritev2-common.c b/misc/tst-preadvwritev2-common.c index 8abedc14d..9d4909bdb 100644 --- a/misc/tst-preadvwritev2-common.c +++ b/misc/tst-preadvwritev2-common.c @@ -22,9 +22,21 @@ static void do_test_with_invalid_flags (void) { +#ifndef RWF_HIPRI +# define RWF_HIPRI 0 +#endif +#ifndef RWF_DSYNC +# define RWF_DSYNC 0 +#endif +#ifndef RWF_SYNC +# define RWF_SYNC 0 +#endif +#ifndef RWF_NOWAIT +# define RWF_NOWAIT 0 +#endif #define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT) /* Set the next bit from the mask of all supported flags. */ - int invalid_flag = __builtin_clz (RWF_SUPPORTED); + int invalid_flag = RWF_SUPPORTED != 0 ? __builtin_clz (RWF_SUPPORTED) : 2; invalid_flag = 0x1 << ((sizeof (int) * CHAR_BIT) - invalid_flag); char buf[32]; diff --git a/sysdeps/posix/preadv2.c b/sysdeps/posix/preadv2.c index b79b7b1bc..cd96677ad 100644 --- a/sysdeps/posix/preadv2.c +++ b/sysdeps/posix/preadv2.c @@ -16,6 +16,7 @@ License along with the GNU C Library; if not, see . */ +#include #include #include diff --git a/sysdeps/posix/preadv64v2.c b/sysdeps/posix/preadv64v2.c index 263f9b77c..649bde4c5 100644 --- a/sysdeps/posix/preadv64v2.c +++ b/sysdeps/posix/preadv64v2.c @@ -16,7 +16,8 @@ License along with the GNU C Library; if not, see . */ -#include +#include +#include #include ssize_t diff --git a/sysdeps/posix/pwritev2.c b/sysdeps/posix/pwritev2.c index d746059d4..601f6b1b1 100644 --- a/sysdeps/posix/pwritev2.c +++ b/sysdeps/posix/pwritev2.c @@ -16,6 +16,7 @@ License along with the GNU C Library; if not, see . */ +#include #include #include diff --git a/sysdeps/posix/pwritev64v2.c b/sysdeps/posix/pwritev64v2.c index f340c8a46..9f05f97b4 100644 --- a/sysdeps/posix/pwritev64v2.c +++ b/sysdeps/posix/pwritev64v2.c @@ -16,6 +16,7 @@ License along with the GNU C Library; if not, see . */ +#include #include #include -- 2.30.2