]> granicus.if.org Git - icinga2/commitdiff
Add SUN_LEN compatibility macro for Haiku
authorGunnar Beutner <gunnar.beutner@netways.de>
Sat, 6 Sep 2014 00:26:42 +0000 (02:26 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Sat, 6 Sep 2014 00:30:09 +0000 (02:30 +0200)
refs #7115

lib/base/unix.hpp

index 5d8133afd90a3caa98c7279253ef7ca5c6df7514..adb61b2361f208aaa8ad3d72b3019ebc19d1d2dc 100644 (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 */