diff options
author | 2016-08-30 20:02:27 -0400 | |
---|---|---|
committer | 2016-08-30 20:02:27 -0400 | |
commit | 050704ab23b698b00ee2ded8dbd4df9afceb8844 (patch) | |
tree | f9425477411207e8257b76b0a96b4b029b461fea /common/ipc-client.c | |
parent | Merge pull request #869 from Hummer12007/patch-1 (diff) | |
parent | Fix to make ipc client code FreeBSD compatible. (diff) | |
download | sway-050704ab23b698b00ee2ded8dbd4df9afceb8844.tar.gz sway-050704ab23b698b00ee2ded8dbd4df9afceb8844.tar.zst sway-050704ab23b698b00ee2ded8dbd4df9afceb8844.zip |
Merge pull request #874 from yohanesu75/ipc-client-fix
Fix to make ipc client code FreeBSD compatible.
Diffstat (limited to 'common/ipc-client.c')
-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) { | |||
34 | addr.sun_family = AF_UNIX; | 34 | addr.sun_family = AF_UNIX; |
35 | strncpy(addr.sun_path, socket_path, sizeof(addr.sun_path)); | 35 | strncpy(addr.sun_path, socket_path, sizeof(addr.sun_path)); |
36 | addr.sun_path[sizeof(addr.sun_path) - 1] = 0; | 36 | addr.sun_path[sizeof(addr.sun_path) - 1] = 0; |
37 | int l = sizeof(addr.sun_family) + strlen(addr.sun_path); | 37 | int l = sizeof(struct sockaddr_un); |
38 | if (connect(socketfd, (struct sockaddr *)&addr, l) == -1) { | 38 | if (connect(socketfd, (struct sockaddr *)&addr, l) == -1) { |
39 | sway_abort("Unable to connect to %s", socket_path); | 39 | sway_abort("Unable to connect to %s", socket_path); |
40 | } | 40 | } |