[vlc-devel] [PATCH] configure: check for declarations of daemon and fork
Felix Paul Kühne
fkuehne at videolan.org
Fri Sep 11 13:40:29 CEST 2015
tvOS includes those functions but prevents their use so we need check their declaration
---
configure.ac | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 55513bd..2974bb4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -548,7 +548,9 @@ need_libc=false
dnl Check for usual libc functions
AC_CHECK_DECLS([nanosleep],,,[#include <time.h>])
-AC_CHECK_FUNCS([daemon fcntl fstatvfs fork getenv getpwuid_r isatty lstat memalign mkostemp mmap open_memstream openat pread posix_fadvise posix_madvise setlocale stricmp strnicmp strptime uselocale pthread_cond_timedwait_monotonic_np pthread_condattr_setclock])
+AC_CHECK_DECLS([daemon],,,[#include <stdlib.h>])
+AC_CHECK_DECLS([fork],,,[#include <unistd.h>])
+AC_CHECK_FUNCS([fcntl fstatvfs getenv getpwuid_r isatty lstat memalign mkostemp mmap open_memstream openat pread posix_fadvise posix_madvise setlocale stricmp strnicmp strptime uselocale pthread_cond_timedwait_monotonic_np pthread_condattr_setclock])
AC_REPLACE_FUNCS([atof atoll dirfd fdopendir ffsll flockfile fsync getdelim getpid lldiv nrand48 poll posix_memalign rewind setenv strcasecmp strcasestr strdup strlcpy strndup strnlen strsep strtof strtok_r strtoll swab tdestroy strverscmp])
AC_CHECK_FUNCS(fdatasync,,
[AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
--
2.5.1
More information about the vlc-devel
mailing list