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/config | |
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/config')
-rw-r--r-- | sway/config/bar.c | 4 | ||||
-rw-r--r-- | sway/config/output.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sway/config/bar.c b/sway/config/bar.c index f90fcdc0..1c7c13b2 100644 --- a/sway/config/bar.c +++ b/sway/config/bar.c | |||
@@ -194,7 +194,7 @@ static void invoke_swaybar(struct bar_config *bar) { | |||
194 | sway_log_errno(SWAY_ERROR, "socketpair failed"); | 194 | sway_log_errno(SWAY_ERROR, "socketpair failed"); |
195 | return; | 195 | return; |
196 | } | 196 | } |
197 | if (!set_cloexec(sockets[0], true) || !set_cloexec(sockets[1], true)) { | 197 | if (!sway_set_cloexec(sockets[0], true) || !sway_set_cloexec(sockets[1], true)) { |
198 | return; | 198 | return; |
199 | } | 199 | } |
200 | 200 | ||
@@ -222,7 +222,7 @@ static void invoke_swaybar(struct bar_config *bar) { | |||
222 | sway_log_errno(SWAY_ERROR, "fork failed"); | 222 | sway_log_errno(SWAY_ERROR, "fork failed"); |
223 | _exit(EXIT_FAILURE); | 223 | _exit(EXIT_FAILURE); |
224 | } else if (pid == 0) { | 224 | } else if (pid == 0) { |
225 | if (!set_cloexec(sockets[1], false)) { | 225 | if (!sway_set_cloexec(sockets[1], false)) { |
226 | _exit(EXIT_FAILURE); | 226 | _exit(EXIT_FAILURE); |
227 | } | 227 | } |
228 | 228 | ||
diff --git a/sway/config/output.c b/sway/config/output.c index 50bf1155..42deec67 100644 --- a/sway/config/output.c +++ b/sway/config/output.c | |||
@@ -505,7 +505,7 @@ static bool _spawn_swaybg(char **command) { | |||
505 | sway_log_errno(SWAY_ERROR, "socketpair failed"); | 505 | sway_log_errno(SWAY_ERROR, "socketpair failed"); |
506 | return false; | 506 | return false; |
507 | } | 507 | } |
508 | if (!set_cloexec(sockets[0], true) || !set_cloexec(sockets[1], true)) { | 508 | if (!sway_set_cloexec(sockets[0], true) || !sway_set_cloexec(sockets[1], true)) { |
509 | return false; | 509 | return false; |
510 | } | 510 | } |
511 | 511 | ||
@@ -529,7 +529,7 @@ static bool _spawn_swaybg(char **command) { | |||
529 | sway_log_errno(SWAY_ERROR, "fork failed"); | 529 | sway_log_errno(SWAY_ERROR, "fork failed"); |
530 | _exit(EXIT_FAILURE); | 530 | _exit(EXIT_FAILURE); |
531 | } else if (pid == 0) { | 531 | } else if (pid == 0) { |
532 | if (!set_cloexec(sockets[1], false)) { | 532 | if (!sway_set_cloexec(sockets[1], false)) { |
533 | _exit(EXIT_FAILURE); | 533 | _exit(EXIT_FAILURE); |
534 | } | 534 | } |
535 | 535 | ||