Some preprocessor conditions for compability on OpenWrt

This commit is contained in:
ejurgensen 2014-06-16 23:31:44 +02:00
parent 24da24e275
commit 2247fadbfa
3 changed files with 10 additions and 1 deletions

View File

@ -44,6 +44,7 @@ AC_CHECK_FUNCS(posix_fadvise)
AC_CHECK_FUNCS(strptime)
AC_CHECK_FUNCS(strtok_r)
AC_CHECK_FUNCS(timegm)
AC_CHECK_FUNCS(euidaccess)
dnl Large File Support (LFS)
AC_SYS_LARGEFILE

View File

@ -1244,7 +1244,11 @@ process_inotify_dir(struct watch_info *wi, char *path, struct inotify_event *ie)
free(wi->path);
wi->path = s;
#ifdef HAVE_EUIDACCESS
if (euidaccess(path, (R_OK | X_OK)) < 0)
#else
if (access(path, (R_OK | X_OK)) < 0)
#endif
{
DPRINTF(E_LOG, L_SCAN, "Directory access to '%s' failed: %s\n", path, strerror(errno));
@ -1307,7 +1311,11 @@ process_inotify_file(struct watch_info *wi, char *path, struct inotify_event *ie
{
DPRINTF(E_DBG, L_SCAN, "File permissions changed: %s\n", path);
#ifdef HAVE_EUIDACCESS
if (euidaccess(path, R_OK) < 0)
#else
if (access(path, R_OK) < 0)
#endif
{
DPRINTF(E_LOG, L_SCAN, "File access to '%s' failed: %s\n", path, strerror(errno));

View File

@ -367,7 +367,7 @@ transcode(struct transcode_ctx *ctx, struct evbuffer *evbuf, int wanted)
#elif LIBAVCODEC_VERSION_MAJOR >= 55 || (LIBAVCODEC_VERSION_MAJOR == 54 && LIBAVCODEC_VERSION_MINOR >= 35)
if (frame)
avcodec_free_frame(&frame);
#else
#elif LIBAVCODEC_VERSION_MAJOR >= 54 || (LIBAVCODEC_VERSION_MAJOR == 53 && LIBAVCODEC_VERSION_MINOR >= 35)
if (frame)
av_free(frame);
#endif