Introduce __sa_family_t for BSD compatibiliy

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
This commit is contained in:
Sebastian Huber 2016-04-18 15:29:23 +02:00 committed by Corinna Vinschen
parent cb376b255d
commit e03a7056a6
3 changed files with 8 additions and 1 deletions

View File

@ -188,6 +188,10 @@ typedef _CLOCKID_T_ __clockid_t;
#define _TIMER_T_ unsigned long
typedef _TIMER_T_ __timer_t;
#ifndef __machine_sa_family_t_defined
typedef __uint8_t __sa_family_t;
#endif
#ifndef __machine_socklen_t_defined
typedef __uint32_t __socklen_t;
#endif

View File

@ -24,7 +24,7 @@ typedef __socklen_t socklen_t;
#define socklen_t socklen_t
#endif
typedef uint16_t sa_family_t;
typedef __sa_family_t sa_family_t;
#ifndef __INSIDE_CYGWIN_NET__
struct sockaddr {

View File

@ -42,6 +42,9 @@ typedef __uint64_t __ino_t;
#define __machine_key_t_defined
typedef long long __key_t;
#define __machine_sa_family_t_defined
typedef __uint16_t __sa_family_t;
/* Not unsigned for backward compatibility. */
#define __machine_socklen_t_defined
typedef int __socklen_t;