changeset 14662:69ca6b2ea292

sys_uio: Make <sys/uio.h> self-contained. * lib/sys_uio.in.h: Include <sys/types.h> before <sys/uio.h>. * doc/posix-headers/sys_uio.texi: Mention the OpenBSD problem.
author Bruno Haible <bruno@clisp.org>
date Sat, 30 Apr 2011 13:54:47 +0200
parents b98c01416471
children d426501f792a
files ChangeLog doc/posix-headers/sys_uio.texi lib/sys_uio.in.h
diffstat 3 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Apr 30 13:38:43 2011 +0200
+++ b/ChangeLog	Sat Apr 30 13:54:47 2011 +0200
@@ -1,3 +1,9 @@
+2011-04-30  Bruno Haible  <bruno@clisp.org>
+
+	sys_uio: Make <sys/uio.h> self-contained.
+	* lib/sys_uio.in.h: Include <sys/types.h> before <sys/uio.h>.
+	* doc/posix-headers/sys_uio.texi: Mention the OpenBSD problem.
+
 2011-04-30  Bruno Haible  <bruno@clisp.org>
 
 	sys_socket: Ensure 'struct iovec' definition.
--- a/doc/posix-headers/sys_uio.texi	Sat Apr 30 13:38:43 2011 +0200
+++ b/doc/posix-headers/sys_uio.texi	Sat Apr 30 13:54:47 2011 +0200
@@ -10,6 +10,10 @@
 @item
 This header file is missing on some platforms:
 mingw.
+@item
+This header file is not self-contained (it requires @code{<sys/types.h>} to be
+included first) on some platforms:
+OpenBSD 4.4.
 @end itemize
 
 Portability problems not fixed by Gnulib:
--- a/lib/sys_uio.in.h	Sat Apr 30 13:38:43 2011 +0200
+++ b/lib/sys_uio.in.h	Sat Apr 30 13:54:47 2011 +0200
@@ -24,6 +24,9 @@
 
 #if @HAVE_SYS_UIO_H@
 
+/* On OpenBSD 4.4, <sys/uio.h> assumes prior inclusion of <sys/types.h>.  */
+# include <sys/types.h>
+
 /* The include_next requires a split double-inclusion guard.  */
 # @INCLUDE_NEXT@ @NEXT_SYS_UIO_H@