]> git.alsa-project.org Git - alsa-lib.git/commitdiff
ucm: use close_range on _GNU_SOURCE
authorJochen Sprickerhof <git@jochen.sprickerhof.de>
Sun, 15 Jun 2025 08:10:52 +0000 (10:10 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 31 Jul 2025 13:30:51 +0000 (15:30 +0200)
Closes: https://github.com/alsa-project/alsa-lib/pull/459
Signed-off-by: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/ucm/ucm_exec.c

index 276cf592d15b1523aa864a6d2e114a82f46e2dc3..b79a84aef32ca748d58a70b0e85b0946e1957fb9 100644 (file)
@@ -254,8 +254,12 @@ int uc_mgr_exec(const char *prog)
 
                close(f);
 
+#if defined(_GNU_SOURCE)
+               close_range(3, maxfd, 0);
+#else
                for (f = 3; f < maxfd; f++)
                        close(f);
+#endif
 
                /* install default handlers for the forked process */
                signal(SIGINT, SIG_DFL);