conf: avoid using close_range when undefined

Only call close_range when CLOSE_RANGE_UNSHARE is defined.

Fixes compilation on alpine.
This commit is contained in:
Wim Taymans 2026-06-23 18:35:35 +02:00
parent 559a30b0b4
commit 7dac6a71d5

View file

@ -982,7 +982,9 @@ static int do_exec(struct pw_context *context, char *const *argv)
for (p = argv; *p; ++p)
spa_strbuf_append(&s, " '%s'", *p);
#ifdef CLOSE_RANGE_UNSHARE
close_range(3, ~0U, CLOSE_RANGE_UNSHARE);
#endif
pw_log_info("exec%s", s.buffer);
res = execvp(argv[0], argv);