sys_uio: Make <sys/uio.h> self-contained.
authorBruno Haible <bruno@clisp.org>
Sat, 30 Apr 2011 11:54:47 +0000 (13:54 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 30 Apr 2011 11:54:47 +0000 (13:54 +0200)
* lib/sys_uio.in.h: Include <sys/types.h> before <sys/uio.h>.
* doc/posix-headers/sys_uio.texi: Mention the OpenBSD problem.

ChangeLog
doc/posix-headers/sys_uio.texi
lib/sys_uio.in.h

index 987b46e68143502802806fdb99080388d99e6745..796a2ba10c74d49f79ff20c9f4ac4dd6181ad3f4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index bc4825400dffac26e846196f66d752070f24bc25..1f8c8a2c8699f231909a81dd1e4420fa580fa610 100644 (file)
@@ -10,6 +10,10 @@ Portability problems fixed by Gnulib:
 @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:
index faad3de206980443183bb5486a8f8dc5ca5077cd..0eaff612a36e5ef32acb66ea0e1fd3310fd24728 100644 (file)
@@ -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@