diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-04-18 15:29:22 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2016-04-19 16:51:00 +0200 |
commit | cb376b255da5d4300efb4723dd8a8d09eae9f7c6 (patch) | |
tree | 21c66c97af813200be16e36319709aee4c0c3358 /winsup/cygwin/include | |
parent | 76a2110b473c12eb7a9c9e5d15d54309db5f8b9c (diff) | |
download | cygnal-cb376b255da5d4300efb4723dd8a8d09eae9f7c6.tar.gz cygnal-cb376b255da5d4300efb4723dd8a8d09eae9f7c6.tar.bz2 cygnal-cb376b255da5d4300efb4723dd8a8d09eae9f7c6.zip |
Introduce __socklen_t for BSD compatibility
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Diffstat (limited to 'winsup/cygwin/include')
-rw-r--r-- | winsup/cygwin/include/cygwin/socket.h | 8 | ||||
-rw-r--r-- | winsup/cygwin/include/machine/_types.h | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/winsup/cygwin/include/cygwin/socket.h b/winsup/cygwin/include/cygwin/socket.h index b74ada7eb..b82b08509 100644 --- a/winsup/cygwin/include/cygwin/socket.h +++ b/winsup/cygwin/include/cygwin/socket.h @@ -16,12 +16,11 @@ details. */ extern "C" { #endif /* __cplusplus */ -#include <stdint.h> +#include <sys/types.h> -/* Not unsigned for backward compatibility. Keep #define for backward - compatibility. */ +/* Keep #define socklen_t for backward compatibility. */ #ifndef socklen_t -typedef int socklen_t; +typedef __socklen_t socklen_t; #define socklen_t socklen_t #endif @@ -51,7 +50,6 @@ struct sockaddr_storage { #include <asm/socket.h> /* arch-dependent defines */ #include <cygwin/sockios.h> /* the SIOCxxx I/O controls */ #include <sys/uio.h> /* iovec support */ -#include <sys/types.h> struct ucred { pid_t pid; diff --git a/winsup/cygwin/include/machine/_types.h b/winsup/cygwin/include/machine/_types.h index 8a2c67935..ee1a6c64c 100644 --- a/winsup/cygwin/include/machine/_types.h +++ b/winsup/cygwin/include/machine/_types.h @@ -42,4 +42,8 @@ typedef __uint64_t __ino_t; #define __machine_key_t_defined typedef long long __key_t; +/* Not unsigned for backward compatibility. */ +#define __machine_socklen_t_defined +typedef int __socklen_t; + #endif /* _MACHINE__TYPES_H */ |