commit 5f0153ba0ec083176aa5ec77da407a643f57d77a
parent b4aba48fade220bd18ddf4539e61a257de126b63
Author: Joris Vink <joris@coders.se>
Date:   Tue, 28 May 2019 21:44:46 +0200
Fix unix binds on BSD families.
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/kore.c b/src/kore.c
@@ -398,9 +398,10 @@ kore_server_bind_unix(const char *path, const char *ccb)
 #if defined(__linux__)
 	if (sun.sun_path[0] == '@')
 		sun.sun_path[0] = '\0';
-#endif
-
 	socklen = sizeof(sun.sun_family) + len;
+#else
+	socklen = sizeof(sun);
+#endif
 
 	if ((l = kore_listener_alloc(AF_UNIX, ccb)) == NULL)
 		return (KORE_RESULT_ERROR);