git-preadwritev2-3
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Fri, 26 Jan 2018 22:35:29 +0000 (22:35 +0000)
committerAurelien Jarno <aurel32@debian.org>
Fri, 26 Jan 2018 22:35:29 +0000 (22:35 +0000)
commit 2263ca7ce8a824f53debcc724bd21cd7099e1161
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sun Sep 3 03:03:40 2017 +0200

    hurd: Fix p{read,write}{,v64}v2.c build

            * misc/preadv2.c: Include <errno.h>.
            * misc/preadv64v2.c: Include <errno.h>.
            * misc/pwritev2.c: Include <errno.h>.
            * misc/pwritev64v2.c: Include <errno.h>.
            * sysdeps/posix/preadv2.c: Include <errno.h>.
            * sysdeps/posix/preadv64v2.c: Include <errno.h>.
            Fix <unistd.h> inclusion.
            * sysdeps/posix/pwritev2.c: Include <errno.h>.
            * sysdeps/posix/pwritev64v2.c: Include <errno.h>.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name git-preadwritev2-3.diff

misc/preadv2.c
misc/preadv64v2.c
misc/pwritev2.c
misc/pwritev64v2.c
misc/tst-preadvwritev2-common.c
sysdeps/posix/preadv2.c
sysdeps/posix/preadv64v2.c
sysdeps/posix/pwritev2.c
sysdeps/posix/pwritev64v2.c

index a62dcaa69929d739635cf0d2fbc5f540ea71341e..fe379401eebd2e2c4f6c2655216f4f9080e3fa0d 100644 (file)
@@ -16,6 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <errno.h>
 #include <sys/uio.h>
 
 /* Same as preadv but with an additional flags argument.  */
index a802c2f1ab39155f6d12f259238a134f984deaa7..e0f05a506a60c6436f1dd847be08ece7ec4e827e 100644 (file)
@@ -16,6 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <errno.h>
 #include <sys/uio.h>
 
 /* Same as preadv64 but with an addional flag argument.  */
index b9e07272da7af5bb263b6bb7e9ae7c8059f15380..ead84471fc76a280b61a3e7c4fadcbbc71e08fc3 100644 (file)
@@ -16,6 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <errno.h>
 #include <sys/uio.h>
 
 /* Same as pwritev but with an additional flags argument.  */
index 1f874f054c4e72f4be92686dccf9169538e2e7c7..c72689cc70af7a864a1d5fb1037070367abaa3f0 100644 (file)
@@ -16,6 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <errno.h>
 #include <sys/uio.h>
 
 /* Same as preadv64 but with an addional flag argument.  */
index 8abedc14d0602b8e7aeeb1c3108678c9271760d6..9d4909bdb76aff348e43b715ff0039c360f8d671 100644 (file)
 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];
index b79b7b1bc3ca8e80ed7bf53388426b3f8d8bf44b..cd96677aded6a73336f8e5a4372c1b6ea54e2564 100644 (file)
@@ -16,6 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <errno.h>
 #include <unistd.h>
 #include <sys/uio.h>
 
index 263f9b77c44451b509665fcbbc78412244facadb..649bde4c5a5b8f83c527fc4adf2c4ef590c7a2b9 100644 (file)
@@ -16,7 +16,8 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <unistd.>
+#include <errno.h>
+#include <unistd.h>
 #include <sys/uio.h>
 
 ssize_t
index d746059d421ff66b6fb14091555b8cda0305274f..601f6b1b10ee42be670d6886dff016a2032820a1 100644 (file)
@@ -16,6 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <errno.h>
 #include <unistd.h>
 #include <sys/uio.h>
 
index f340c8a46d676de96a98fa8fc9dc454f5956880a..9f05f97b4056266cb0c6b861f2ce81efcb0f5443 100644 (file)
@@ -16,6 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <errno.h>
 #include <unistd.h>
 #include <sys/uio.h>