diff options
author | Bruno Haible <bruno@clisp.org> | 2011-04-30 13:38:43 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2011-04-30 13:38:43 +0200 |
commit | 95bbafdb715dcfdbe7f629e2411b300ccaa84db4 (patch) | |
tree | 4914ae023bd8864da7048e93496a9fffef7ddd55 /lib | |
parent | c9b4d37004240533b0aab80806cc8539140e4fd1 (diff) | |
download | gnulib-95bbafdb715dcfdbe7f629e2411b300ccaa84db4.tar.gz |
sys_socket: Ensure 'struct iovec' definition.
* lib/sys_socket.in.h: Include <sys/uio.h> also on platforms that have
<sys/socket.h>.
* doc/posix-headers/sys_socket.texi: Mention the OpenBSD problem.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sys_socket.in.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index f9e368b6ca..78026697bd 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -108,6 +108,12 @@ struct sockaddr_storage #endif +/* Get struct iovec. */ +/* But avoid namespace pollution on glibc systems. */ +#if ! defined __GLIBC__ +# include <sys/uio.h> +#endif + #if @HAVE_SYS_SOCKET_H@ /* A platform that has <sys/socket.h>. */ @@ -176,9 +182,6 @@ typedef int socklen_t; # endif -/* For struct iovec */ -# include <sys/uio.h> - /* Rudimentary 'struct msghdr'; this works as long as you don't try to access msg_control or msg_controllen. */ struct msghdr { |