]> git.sesse.net Git - vlc/commitdiff
Compilation fix for Android that has if_nametoindex but not if_nameindex
authorJean-Baptiste Kempf <jb@videolan.org>
Mon, 13 Jun 2011 15:19:19 +0000 (17:19 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 13 Jun 2011 15:21:13 +0000 (17:21 +0200)
configure.ac
include/vlc_fixups.h

index b0000dc212b750477f0142dd358ebd0485f6fb3e..8a29df283f5f54c1d7bd50635913f9ab1bb5dc87 100644 (file)
@@ -566,7 +566,7 @@ dnl Check for system libs needed
 need_libc=false
 
 dnl Check for usual libc functions
-AC_CHECK_FUNCS([daemon fcntl fdopendir fstatvfs fork getenv getpwuid_r gettimeofday if_nameindex isatty lstat memalign mmap openat pread posix_fadvise posix_madvise posix_memalign setlocale stricmp strnicmp uselocale])
+AC_CHECK_FUNCS([daemon fcntl fdopendir fstatvfs fork getenv getpwuid_r gettimeofday if_nameindex if_nametoindex isatty lstat memalign mmap openat pread posix_fadvise posix_madvise posix_memalign setlocale stricmp strnicmp uselocale])
 AC_REPLACE_FUNCS([asprintf atof atoll dirfd flockfile getcwd getdelim getpid gmtime_r lldiv localtime_r nrand48 rewind setenv strcasecmp strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtok_r strtoll swab tdestroy vasprintf])
 AC_CHECK_FUNCS(fdatasync,,
   [AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
index ead3ac32920acf6ba5bfcfe904b69d4df33f68a2..ab55f2eebcfa840b9e787efe04246a2c4761e4a1 100644 (file)
@@ -285,7 +285,9 @@ struct if_nameindex
     unsigned if_index;
     char    *if_name;
 };
-# define if_nametoindex(name)   atoi(name)
+# ifndef HAVE_IF_NAMETOINDEX
+#  define if_nametoindex(name)   atoi(name)
+# endif
 # define if_nameindex()         (errno = ENOBUFS, NULL)
 # define if_freenameindex(list) (void)0
 #endif