From 8c4765c6079c014135ba13a8ed6f097f51d502f8 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sat, 6 Sep 2014 02:26:42 +0200 Subject: [PATCH] Add SUN_LEN compatibility macro for Haiku refs #7115 --- lib/base/unix.hpp | 6 ++++++ 1 file changed, 6 insertions(+) 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 */ -- 2.50.1