diff options
author | Sheena Artrip <sheena.artrip@gmail.com> | 2019-10-28 22:54:16 -0700 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-11-01 12:41:08 -0400 |
commit | 7efb5d467368ea9168cebc2473bc3c6942e031bb (patch) | |
tree | 2d707d7d6c85453fdc187ecd5e8c8cda34493300 /sway/swaynag.c | |
parent | focus: add a NULL check in `focus <direction>` (diff) | |
download | sway-7efb5d467368ea9168cebc2473bc3c6942e031bb.tar.gz sway-7efb5d467368ea9168cebc2473bc3c6942e031bb.tar.zst sway-7efb5d467368ea9168cebc2473bc3c6942e031bb.zip |
Rename symbol set_cloexec to sway_set_cloexec, remove duplicates.
set_cloexec is defined by both sway and wlroots (and who-knows-else),
so rename the sway one for supporting static linkage. We also remove
the duplicate version of this in client/.
Fixes: https://github.com/swaywm/sway/issues/4677
Diffstat (limited to 'sway/swaynag.c')
-rw-r--r-- | sway/swaynag.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/swaynag.c b/sway/swaynag.c index 0fca6c71..db5a919a 100644 --- a/sway/swaynag.c +++ b/sway/swaynag.c | |||
@@ -36,7 +36,7 @@ bool swaynag_spawn(const char *swaynag_command, | |||
36 | sway_log(SWAY_ERROR, "Failed to create pipe for swaynag"); | 36 | sway_log(SWAY_ERROR, "Failed to create pipe for swaynag"); |
37 | return false; | 37 | return false; |
38 | } | 38 | } |
39 | if (!set_cloexec(swaynag->fd[1], true)) { | 39 | if (!sway_set_cloexec(swaynag->fd[1], true)) { |
40 | goto failed; | 40 | goto failed; |
41 | } | 41 | } |
42 | } | 42 | } |
@@ -46,7 +46,7 @@ bool swaynag_spawn(const char *swaynag_command, | |||
46 | sway_log_errno(SWAY_ERROR, "socketpair failed"); | 46 | sway_log_errno(SWAY_ERROR, "socketpair failed"); |
47 | goto failed; | 47 | goto failed; |
48 | } | 48 | } |
49 | if (!set_cloexec(sockets[0], true) || !set_cloexec(sockets[1], true)) { | 49 | if (!sway_set_cloexec(sockets[0], true) || !sway_set_cloexec(sockets[1], true)) { |
50 | goto failed; | 50 | goto failed; |
51 | } | 51 | } |
52 | 52 | ||
@@ -69,7 +69,7 @@ bool swaynag_spawn(const char *swaynag_command, | |||
69 | sway_log_errno(SWAY_ERROR, "fork failed"); | 69 | sway_log_errno(SWAY_ERROR, "fork failed"); |
70 | _exit(EXIT_FAILURE); | 70 | _exit(EXIT_FAILURE); |
71 | } else if (pid == 0) { | 71 | } else if (pid == 0) { |
72 | if (!set_cloexec(sockets[1], false)) { | 72 | if (!sway_set_cloexec(sockets[1], false)) { |
73 | _exit(EXIT_FAILURE); | 73 | _exit(EXIT_FAILURE); |
74 | } | 74 | } |
75 | 75 | ||