2017-04-25 Joseph Myers <joseph@codesourcery.com>
+ [BZ #21426]
+ * misc/bits/types/struct_iovec.h: New file.
+ * misc/Makefile (headers): Add bits/types/struct_iovec.h.
+ * include/bits/types/struct_iovec.h: New file.
+ * bits/uio.h (struct iovec): Replace by inclusion of
+ <bits/types/struct_iovec.h>.
+ * sysdeps/unix/sysv/linux/bits/uio.h (struct iovec): Likewise.
+ * socket/sys/socket.h: Include <bits/types/struct_iovec.h> instead
+ of <sys/uio.h>.
+ * nptl/tst-cancel4.c: Include <sys/uio.h>
+ * posix/test-errno.c: Likewise.
+ * support/resolv_test.c: Likewise.
+ * conform/Makefile (test-xfail-POSIX2008/arpa/inet.h/conform):
+ Remove.
+ (test-xfail-POSIX2008/netdb.h/conform): Likewise.
+ (test-xfail-POSIX2008/netinet/in.h/conform): Likewise.
+ (test-xfail-POSIX2008/sys/socket.h/conform): Likewise.
+
* conform/data/sys/socket.h-data (*_t): Allow.
2017-04-24 Adhemerval Zanella <adhemerval.zanella@linaro.org>
#endif
-/* `struct iovec' -- Structure describing a section of memory. */
-
-struct iovec
-{
- /* Starting address. */
- __ptr_t iov_base;
- /* Length in bytes. */
- size_t iov_len;
-};
+#include <bits/types/struct_iovec.h>
test-xfail-XOPEN2K/signal.h/conform = yes
test-xfail-XOPEN2K/sys/wait.h/conform = yes
test-xfail-XOPEN2K/ucontext.h/conform = yes
-test-xfail-POSIX2008/arpa/inet.h/conform = yes
-test-xfail-POSIX2008/netdb.h/conform = yes
-test-xfail-POSIX2008/netinet/in.h/conform = yes
test-xfail-POSIX2008/signal.h/conform = yes
-test-xfail-POSIX2008/sys/socket.h/conform = yes
test-xfail-POSIX2008/sys/wait.h/conform = yes
test-xfail-XOPEN2K8/signal.h/conform = yes
test-xfail-XOPEN2K8/sys/wait.h/conform = yes
--- /dev/null
+#include "../../misc/bits/types/struct_iovec.h"
syslog.h sys/syslog.h \
bits/syslog.h bits/syslog-ldbl.h bits/syslog-path.h bits/error.h \
bits/select2.h bits/hwcap.h sys/auxv.h \
- sys/sysmacros.h bits/sysmacros.h
+ sys/sysmacros.h bits/sysmacros.h bits/types/struct_iovec.h
routines := brk sbrk sstk ioctl \
readv writev preadv preadv64 pwritev pwritev64 \
--- /dev/null
+/* Define struct iovec.
+ Copyright (C) 1996-2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef __iovec_defined
+#define __iovec_defined 1
+
+#define __need_size_t
+#include <stddef.h>
+
+/* Structure for scatter/gather I/O. */
+struct iovec
+ {
+ void *iov_base; /* Pointer to data. */
+ size_t iov_len; /* Length of data. */
+ };
+
+#endif
#include <sys/poll.h>
#include <sys/wait.h>
#include <sys/stat.h>
+#include <sys/uio.h>
/* Since STREAMS are not supported in the standard Linux kernel and
#include <sys/types.h>
#include <sys/statfs.h>
#include <sys/mman.h>
+#include <sys/uio.h>
#include <unistd.h>
#include <netinet/in.h>
__BEGIN_DECLS
-#include <sys/uio.h>
+#include <bits/types/struct_iovec.h>
#define __need_size_t
#include <stddef.h>
#ifdef __USE_GNU
#include <support/xsocket.h>
#include <support/xthread.h>
#include <support/xunistd.h>
+#include <sys/uio.h>
#include <unistd.h>
/* Response builder. */
#define UIO_MAXIOV 1024
-/* Structure for scatter/gather I/O. */
-struct iovec
- {
- void *iov_base; /* Pointer to data. */
- size_t iov_len; /* Length of data. */
- };
+#include <bits/types/struct_iovec.h>
#endif