1 #ifndef foopulsecoresockethfoo
2 #define foopulsecoresockethfoo
4 #ifdef HAVE_SYS_SOCKET_H
5 #include <sys/socket.h>
12 typedef long suseconds_t;
14 /** Windows 10 supports AF_UNIX as of build 17603, with
15 support provided in the header file <afunix.h>. However,
16 only the latest Windows SDK provides this file; older SDKs and
19 Hence we define SOCKADDR_UN here. We do not expect this definition to change
20 as Windows has some pretty good binary backwards-compatibility guarantees.
22 This shouldn't pose a problem for older versions of Windows; we expect them to
23 fail with an error whenever we try to make a socket of type AF_UNIX. */
24 #define UNIX_PATH_MAX 108
26 typedef struct sockaddr_un
28 ADDRESS_FAMILY sun_family; /* AF_UNIX */
29 char sun_path[UNIX_PATH_MAX]; /* pathname */
30 } SOCKADDR_UN, *PSOCKADDR_UN;
33 #define SUN_LEN(ptr) \
34 ((size_t)(((struct sockaddr_un *) 0)->sun_path) + strlen((ptr)->sun_path))
41 #ifdef HAVE_WS2TCPIP_H