mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-12 23:43:23 -05:00
Some preprocessor conditions for compability on OpenWrt
This commit is contained in:
parent
24da24e275
commit
2247fadbfa
@ -44,6 +44,7 @@ AC_CHECK_FUNCS(posix_fadvise)
|
|||||||
AC_CHECK_FUNCS(strptime)
|
AC_CHECK_FUNCS(strptime)
|
||||||
AC_CHECK_FUNCS(strtok_r)
|
AC_CHECK_FUNCS(strtok_r)
|
||||||
AC_CHECK_FUNCS(timegm)
|
AC_CHECK_FUNCS(timegm)
|
||||||
|
AC_CHECK_FUNCS(euidaccess)
|
||||||
|
|
||||||
dnl Large File Support (LFS)
|
dnl Large File Support (LFS)
|
||||||
AC_SYS_LARGEFILE
|
AC_SYS_LARGEFILE
|
||||||
|
@ -1244,7 +1244,11 @@ process_inotify_dir(struct watch_info *wi, char *path, struct inotify_event *ie)
|
|||||||
free(wi->path);
|
free(wi->path);
|
||||||
wi->path = s;
|
wi->path = s;
|
||||||
|
|
||||||
|
#ifdef HAVE_EUIDACCESS
|
||||||
if (euidaccess(path, (R_OK | X_OK)) < 0)
|
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));
|
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);
|
DPRINTF(E_DBG, L_SCAN, "File permissions changed: %s\n", path);
|
||||||
|
|
||||||
|
#ifdef HAVE_EUIDACCESS
|
||||||
if (euidaccess(path, R_OK) < 0)
|
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));
|
DPRINTF(E_LOG, L_SCAN, "File access to '%s' failed: %s\n", path, strerror(errno));
|
||||||
|
|
||||||
|
@ -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)
|
#elif LIBAVCODEC_VERSION_MAJOR >= 55 || (LIBAVCODEC_VERSION_MAJOR == 54 && LIBAVCODEC_VERSION_MINOR >= 35)
|
||||||
if (frame)
|
if (frame)
|
||||||
avcodec_free_frame(&frame);
|
avcodec_free_frame(&frame);
|
||||||
#else
|
#elif LIBAVCODEC_VERSION_MAJOR >= 54 || (LIBAVCODEC_VERSION_MAJOR == 53 && LIBAVCODEC_VERSION_MINOR >= 35)
|
||||||
if (frame)
|
if (frame)
|
||||||
av_free(frame);
|
av_free(frame);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user