Add SUN_LEN compatibility macro for Haiku

refs #7115
This commit is contained in:
Gunnar Beutner 2014-09-06 02:26:42 +02:00
parent 666c92fa76
commit 8c4765c607
1 changed files with 6 additions and 0 deletions

View File

@ -49,6 +49,12 @@ typedef int SOCKET;
#define closesocket close
#define ioctlsocket ioctl
#ifndef SUN_LEN
/* TODO: Ideally this should take into the account how
long the socket path really is. */
# define SUN_LEN(sun) (sizeof(sockaddr_un))
#endif /* SUN_LEN */
#ifndef PATH_MAX
# define PATH_MAX 1024
#endif /* PATH_MAX */