[vlc-devel] [PATCH] bluray: check for getmntent_r symbol
Thomas Guillem
thomas at gllm.fr
Tue Nov 5 13:14:28 CET 2019
getmntent_r is not necessary avalaible when the mntent.h header is present (cf.
Android).
---
configure.ac | 4 ++--
modules/access/bluray.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index 9dc67e338d6..1201826d2f7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -639,7 +639,7 @@ dnl Check for system libs needed
need_libc=false
dnl Check for usual libc functions
-AC_CHECK_FUNCS([accept4 daemon fcntl flock fstatat fstatvfs fork getenv getpwuid_r isatty memalign mkostemp mmap open_memstream newlocale pipe2 pread posix_fadvise posix_madvise setlocale stricmp strnicmp strptime uselocale])
+AC_CHECK_FUNCS([accept4 daemon 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,,
@@ -900,7 +900,7 @@ dnl BSD
AC_CHECK_HEADERS([netinet/tcp.h netinet/udplite.h sys/param.h sys/mount.h])
dnl GNU/Linux
-AC_CHECK_HEADERS([features.h getopt.h linux/dccp.h linux/magic.h mntent.h sys/eventfd.h])
+AC_CHECK_HEADERS([features.h getopt.h linux/dccp.h linux/magic.h sys/eventfd.h])
dnl MacOS
AC_CHECK_HEADERS([xlocale.h])
diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index b12a416e365..534ddd8a89b 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -28,7 +28,7 @@
#include <assert.h>
#include <stdatomic.h>
-#if defined (HAVE_MNTENT_H) && defined(HAVE_SYS_STAT_H)
+#ifdef HAVE_GETMNTENT_R
# include <mntent.h>
#endif
#include <fcntl.h> /* O_* */
@@ -545,7 +545,7 @@ static void notifyDiscontinuityToParser( demux_sys_t *p_sys );
static void FindMountPoint(char **file)
{
char *device = *file;
-#if defined (HAVE_MNTENT_H) && defined (HAVE_SYS_STAT_H)
+#ifdef HAVE_GETMNTENT_R
/* bd path may be a symlink (e.g. /dev/dvd -> /dev/sr0), so make sure
* we look up the real device */
char *bd_device = realpath(device, NULL);
--
2.20.1
More information about the vlc-devel
mailing list