[vlc-commits] Check for wordexp() explicitly

Rémi Denis-Courmont git at videolan.org
Tue Oct 20 21:47:06 CEST 2020


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Oct 20 22:45:24 2020 +0300| [adfc5b31faad1dad5df5129e682bcff0f6498a92] | committer: Rémi Denis-Courmont

Check for wordexp() explicitly

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

 configure.ac                   | 2 +-
 modules/control/cli/cli.c      | 4 ++--
 modules/control/cli/playlist.c | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 28a09d2b2a..a0b153664c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -695,7 +695,7 @@ dnl Check for system libs needed
 need_libc=false
 
 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])
+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_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,,
diff --git a/modules/control/cli/cli.c b/modules/control/cli/cli.c
index 6c48b887ef..c741e7fcad 100644
--- a/modules/control/cli/cli.c
+++ b/modules/control/cli/cli.c
@@ -296,7 +296,7 @@ static void Process(intf_thread_t *intf, const char *line)
     if (*cmd == '\0')
         return; /* Ignore empty line */
 
-#ifdef HAVE_WORDEXP_H
+#ifdef HAVE_WORDEXP
     wordexp_t we;
     int val = wordexp(cmd, &we, 0);
 
@@ -343,7 +343,7 @@ error:      wordfree(&we);
         cb(intf, args, count);
     }
 
-#ifdef HAVE_WORDEXP_H
+#ifdef HAVE_WORDEXP
     free(args);
     wordfree(&we);
 #endif
diff --git a/modules/control/cli/playlist.c b/modules/control/cli/playlist.c
index a53720414e..d468bc3f40 100644
--- a/modules/control/cli/playlist.c
+++ b/modules/control/cli/playlist.c
@@ -34,7 +34,7 @@
 
 #include "cli.h"
 
-#ifndef HAVE_WORDEXP_H
+#ifndef HAVE_WORDEXP
 /*****************************************************************************
  * parse_MRL: build a input item from a full mrl
  *****************************************************************************
@@ -410,7 +410,7 @@ static void PlaylistAddCommon(intf_thread_t *intf, const char *const *args,
 
     vlc_playlist_Lock(playlist);
     count = vlc_playlist_Count(playlist);
-#ifdef HAVE_WORDEXP_H
+#ifdef HAVE_WORDEXP
 
     for (size_t i = 1; i < n_args;)
     {



More information about the vlc-commits mailing list