Commit 8a727887 authored by Christophe Mutricy's avatar Christophe Mutricy

Some OSes don't have posix_fadvise

parent 22862929
...@@ -469,7 +469,7 @@ dnl Check for system libs needed ...@@ -469,7 +469,7 @@ dnl Check for system libs needed
need_libc=false need_libc=false
dnl Check for usual libc functions dnl Check for usual libc functions
AC_CHECK_FUNCS([gettimeofday strtod strtol strtof strtoll strtoull strsep isatty vasprintf asprintf swab sigrelse getpwuid memalign posix_memalign if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r localtime_r lrintf daemon scandir fork bsearch lstat strlcpy strdup strndup strnlen atof lldiv]) AC_CHECK_FUNCS([gettimeofday strtod strtol strtof strtoll strtoull strsep isatty vasprintf asprintf swab sigrelse getpwuid memalign posix_memalign if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r localtime_r lrintf daemon scandir fork bsearch lstat strlcpy strdup strndup strnlen atof lldiv posix_fadvise posix_madvise])
AC_CHECK_FUNCS(strcasecmp,,[AC_CHECK_FUNCS(stricmp)]) AC_CHECK_FUNCS(strcasecmp,,[AC_CHECK_FUNCS(stricmp)])
AC_CHECK_FUNCS(strncasecmp,,[AC_CHECK_FUNCS(strnicmp)]) AC_CHECK_FUNCS(strncasecmp,,[AC_CHECK_FUNCS(strnicmp)])
AC_CHECK_FUNCS(strcasestr,,[AC_CHECK_FUNCS(stristr)]) AC_CHECK_FUNCS(strcasestr,,[AC_CHECK_FUNCS(stristr)])
......
...@@ -131,7 +131,9 @@ static int Open (vlc_object_t *p_this) ...@@ -131,7 +131,9 @@ static int Open (vlc_object_t *p_this)
p_sys->fd = fd; p_sys->fd = fd;
p_access->info.i_size = st.st_size; p_access->info.i_size = st.st_size;
#ifdef HAVE_POSIX_FADVISE
posix_fadvise (fd, 0, 0, POSIX_FADV_SEQUENTIAL); posix_fadvise (fd, 0, 0, POSIX_FADV_SEQUENTIAL);
#endif
return VLC_SUCCESS; return VLC_SUCCESS;
...@@ -212,7 +214,9 @@ static block_t *Block (access_t *p_access) ...@@ -212,7 +214,9 @@ static block_t *Block (access_t *p_access)
msleep (INPUT_ERROR_SLEEP); msleep (INPUT_ERROR_SLEEP);
return NULL; return NULL;
} }
#ifdef HAVE_POSIX_MADVISE
posix_madvise (addr, length, POSIX_MADV_SEQUENTIAL); posix_madvise (addr, length, POSIX_MADV_SEQUENTIAL);
#endif
block_t *block = block_mmap_Alloc (addr, length); block_t *block = block_mmap_Alloc (addr, length);
if (block == NULL) if (block == NULL)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment