* net.cc (cygwin_sendto): Define appropriate parameters using
socklen_t type according to SUSv3. (cygwin_recvfrom): Ditto. (cygwin_setsockopt): Ditto. (cygwin_getsockopt): Ditto. (cygwin_connect): Ditto. (cygwin_accept): Ditto. (cygwin_bind): Ditto. (cygwin_getsockname): Ditto. (cygwin_getpeername): Ditto. (cygwin_recv): Ditto. (cygwin_send): Ditto. * include/cygwin/socket.h (socklen_t): Typedef and define. * include/sys/socket.h: Declare socket functions using socklen_t type.
This commit is contained in:
@ -17,8 +17,11 @@ extern "C" {
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* Not unsigned for backward compatibility. Keep #define for backward
|
||||
compatibility. */
|
||||
#ifndef socklen_t
|
||||
#define socklen_t int /* Not unsigned for backward compat. */
|
||||
typedef int socklen_t;
|
||||
#define socklen_t socklen_t
|
||||
#endif
|
||||
|
||||
typedef uint16_t sa_family_t;
|
||||
|
Reference in New Issue
Block a user