To fix the build error on Android:
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))
^
src/ucm/parser.c:2521:7: note: did you mean 'access'?
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_CHECK_FUNCS([uselocale])
+AC_CHECK_FUNCS([eaccess])
SAVE_LIBRARY_VERSION
AC_SUBST(LIBTOOL_VERSION_INFO)
snprintf(fn, sizeof(fn), "%s.conf", d_name);
ucm_filename(filename, sizeof(filename), 2, d_name, fn);
+#ifdef HAVE_EACCESS
if (eaccess(filename, R_OK))
+#else
+ if (access(filename, R_OK))
+#endif
continue;
err = uc_mgr_config_load(2, filename, &cfg);
return -EINVAL;
}
+#ifdef HAVE_EACCESS
if (eaccess(path, amode))
+#else
+ if (access(path, amode))
+#endif
return 0;
return 1;