]> git.alsa-project.org Git - alsa-lib.git/commitdiff
ucm_exec.c: Include limits.h explicitly to fix build on musl
authorAndreas Müller <schnitzeltony@gmail.com>
Thu, 3 Jun 2021 10:29:03 +0000 (12:29 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 4 Jun 2021 07:26:36 +0000 (09:26 +0200)
Fixes:
| ../../../alsa-lib-1.2.5/src/ucm/ucm_exec.c: In function 'find_exec':
| ../../../alsa-lib-1.2.5/src/ucm/ucm_exec.c:43:18: error: 'PATH_MAX' undeclared (first use in this function)
|    43 |         char bin[PATH_MAX];
|       |                  ^~~~~~~~
| ../../../alsa-lib-1.2.5/src/ucm/ucm_exec.c:43:18: note: each undeclared identifier is reported only once for each function it appears in
| ../../../alsa-lib-1.2.5/src/ucm/ucm_exec.c: In function 'uc_mgr_exec':
| ../../../alsa-lib-1.2.5/src/ucm/ucm_exec.c:177:18: error: 'PATH_MAX' undeclared (first use in this function)
|   177 |         char bin[PATH_MAX];
|       |                  ^~~~~~~~

Fixes: https://github.com/alsa-project/alsa-lib/pull/145
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/ucm/ucm_exec.c

index d83206d0ba330e1a7caf687f1ccc830a79cc511d..4ddf5d1574e9473a0e0e188c9a5b9f6bde0877bf 100644 (file)
@@ -30,6 +30,7 @@
 #include "ucm_local.h"
 #include <sys/stat.h>
 #include <sys/wait.h>
+#include <limits.h>
 #include <dirent.h>
 
 static pthread_mutex_t fork_lock = PTHREAD_MUTEX_INITIALIZER;