diff options
author | Johannes Lundberg <yohanesu75@gmail.com> | 2016-08-30 16:59:36 -0700 |
---|---|---|
committer | Johannes Lundberg <yohanesu75@gmail.com> | 2016-08-30 16:59:36 -0700 |
commit | 949933c5c3b67e9104361c4e15fa83721e436d43 (patch) | |
tree | f9425477411207e8257b76b0a96b4b029b461fea | |
parent | f4356135a1bd17f46eabc893415bfb1fd03fcd7f (diff) | |
download | sway-949933c5c3b67e9104361c4e15fa83721e436d43.tar.xz |
Fix to make ipc client code FreeBSD compatible.
-rw-r--r-- | common/ipc-client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/ipc-client.c b/common/ipc-client.c index 997a87d1..e155c168 100644 --- a/common/ipc-client.c +++ b/common/ipc-client.c @@ -34,7 +34,7 @@ int ipc_open_socket(const char *socket_path) { addr.sun_family = AF_UNIX; strncpy(addr.sun_path, socket_path, sizeof(addr.sun_path)); addr.sun_path[sizeof(addr.sun_path) - 1] = 0; - int l = sizeof(addr.sun_family) + strlen(addr.sun_path); + int l = sizeof(struct sockaddr_un); if (connect(socketfd, (struct sockaddr *)&addr, l) == -1) { sway_abort("Unable to connect to %s", socket_path); } |