Fix unix binds on BSD families.

This commit is contained in:
Joris Vink 2019-05-28 21:44:46 +02:00
parent b4aba48fad
commit 5f0153ba0e
1 changed files with 3 additions and 2 deletions

View File

@ -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);