mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-03-28 07:57:58 -04:00
configure: check if eaccess is available
To fix the error on Android:
external/alsa-lib//src/ucm/parser.c:2521:7: error: implicit declaration of function 'eaccess' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if (eaccess(filename, R_OK))
^
external/alsa-lib//src/ucm/parser.c:2521:7: note: did you mean 'access'?
bionic/libc/include/unistd.h:125:5: note: 'access' declared here
int access(const char* __path, int __mode);
^
1 error generated.
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
This commit is contained in:
parent
2ff45ac535
commit
dc2382e762
3 changed files with 9 additions and 0 deletions
|
|
@ -305,7 +305,11 @@ static int if_eval_path(snd_use_case_mgr_t *uc_mgr, snd_config_t *eval)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
#ifdef HAVE_EACCESS
|
||||
if (eaccess(path, amode))
|
||||
#else
|
||||
if (access(path, amode))
|
||||
#endif
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue