From: Gunnar Beutner Date: Sat, 6 Sep 2014 00:26:42 +0000 (+0200) Subject: Add SUN_LEN compatibility macro for Haiku X-Git-Tag: v2.1.1~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8c4765c6079c014135ba13a8ed6f097f51d502f8;p=icinga2 Add SUN_LEN compatibility macro for Haiku refs #7115 --- diff --git a/lib/base/unix.hpp b/lib/base/unix.hpp index 5d8133afd..adb61b236 100644 --- a/lib/base/unix.hpp +++ b/lib/base/unix.hpp @@ -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 */