vlc | branch: master | Jean-Baptiste Kempf <[email protected]> | Mon Jun 13 17:19:19 2011 +0200| [6d44c8cbde14df36ccd559895a553523f5cc380b] | committer: Jean-Baptiste Kempf
Compilation fix for Android that has if_nametoindex but not if_nameindex > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6d44c8cbde14df36ccd559895a553523f5cc380b --- configure.ac | 2 +- include/vlc_fixups.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index b0000dc..8a29df2 100644 --- a/configure.ac +++ b/configure.ac @@ -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.]) diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h index ead3ac3..ab55f2e 100644 --- a/include/vlc_fixups.h +++ b/include/vlc_fixups.h @@ -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 _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
