[vlc-devel] [PATCH] configure.ac: enforce compilation check for wordexp
Alexandre Janniaux
ajanni at videolabs.io
Mon Nov 16 13:41:43 CET 2020
wordexp can be available on the OS as a private API but not available
for the application. This is the case on iOS armv7.
Fix #25206
---
configure.ac | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index a0b153664c..ace3d2872d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -694,8 +694,15 @@ VLC_LIBRARY_SUFFIX
dnl Check for system libs needed
need_libc=false
+dnl Check for function marked by SDK availability tags
+dnl - wordexp is not available on iOS
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([#include <wordexp.h>],[(void)wordexp;])],
+ [AC_DEFINE([HAVE_WORDEXP], [1], [Define to 1 if wordexp is available])]
+)
+
dnl Check for usual libc functions
-AC_CHECK_FUNCS([accept4 fcntl flock fstatat fstatvfs fork getmntent_r getenv getpwuid_r isatty memalign mkostemp mmap open_memstream newlocale pipe2 pread posix_fadvise posix_madvise setlocale stricmp strnicmp strptime uselocale wordexp])
+AC_CHECK_FUNCS([accept4 fcntl flock fstatat fstatvfs fork getmntent_r getenv getpwuid_r isatty memalign mkostemp mmap open_memstream newlocale pipe2 pread posix_fadvise posix_madvise setlocale stricmp strnicmp strptime uselocale])
AC_REPLACE_FUNCS([aligned_alloc atof atoll dirfd fdopendir flockfile fsync getdelim getpid lfind lldiv memrchr nrand48 poll posix_memalign recvmsg rewind sendmsg setenv strcasecmp strcasestr strdup strlcpy strndup strnlen strnstr strsep strtof strtok_r strtoll swab tdestroy tfind timegm timespec_get strverscmp pathconf])
AC_REPLACE_FUNCS([gettimeofday])
AC_CHECK_FUNC(fdatasync,,
--
2.29.2
More information about the vlc-devel
mailing list