[vlc-commits] bluray: check for getmntent_r symbol

Thomas Guillem git at videolan.org
Tue Nov 19 14:28:28 CET 2019


vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Nov  5 13:11:01 2019 +0100| [2b265c0a821548826c8ee010fe1fa9ce045215b2] | committer: Thomas Guillem

bluray: check for getmntent_r symbol

getmntent_r is not necessarily available when the mntent.h header is present
(cf.  Android).

(cherry picked from commit 731510839d95cb2d6b9e700e8d674945fd835439)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=2b265c0a821548826c8ee010fe1fa9ce045215b2
---

 configure.ac            | 4 ++--
 modules/access/bluray.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 3f98f90b86..03a8adb8a7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -591,7 +591,7 @@ dnl Check for system libs needed
 need_libc=false
 
 dnl Check for usual libc functions
-AC_CHECK_FUNCS([accept4 daemon fcntl flock fstatvfs fork getenv getpwuid_r isatty lstat memalign mkostemp mmap newlocale open_memstream openat pipe2 pread posix_fadvise posix_madvise posix_memalign setlocale stricmp strnicmp strptime uselocale])
+AC_CHECK_FUNCS([accept4 daemon fcntl flock fstatvfs fork getenv getmntent_r getpwuid_r isatty lstat memalign mkostemp mmap newlocale open_memstream openat pipe2 pread posix_fadvise posix_madvise posix_memalign setlocale stricmp strnicmp strptime uselocale])
 AC_REPLACE_FUNCS([aligned_alloc atof atoll dirfd fdopendir ffsll flockfile fsync getdelim getpid lfind lldiv memrchr nrand48 poll 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,,
@@ -849,7 +849,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 68b13c2248..acb60c16d6 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -27,7 +27,7 @@
 
 #include <assert.h>
 
-#if defined (HAVE_MNTENT_H) && defined(HAVE_SYS_STAT_H)
+#ifdef HAVE_GETMNTENT_R
 # include <mntent.h>
 #endif
 #include <fcntl.h>      /* O_* */
@@ -404,7 +404,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);



More information about the vlc-commits mailing list