Fix some build warnings when building with musl
This commit is contained in:
parent
379b66ca95
commit
347aafa6d7
@ -15,7 +15,7 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||||
# USA.
|
# USA.
|
||||||
|
|
||||||
AM_CFLAGS = -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 @STATIC_CFLAGS@
|
AM_CFLAGS = -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
|
||||||
|
|
||||||
SUBDIRS=po
|
SUBDIRS=po
|
||||||
|
|
||||||
@ -55,14 +55,11 @@ minidlnad_LDADD = \
|
|||||||
@LIBID3TAG_LIBS@ \
|
@LIBID3TAG_LIBS@ \
|
||||||
@LIBSQLITE3_LIBS@ \
|
@LIBSQLITE3_LIBS@ \
|
||||||
@LIBAVFORMAT_LIBS@ \
|
@LIBAVFORMAT_LIBS@ \
|
||||||
@LIBAVUTIL_LIBS@ \
|
|
||||||
@LIBEXIF_LIBS@ \
|
@LIBEXIF_LIBS@ \
|
||||||
@LIBINTL@ \
|
@LIBINTL@ \
|
||||||
@LIBICONV@ \
|
@LIBICONV@ \
|
||||||
-lFLAC $(flacogglibs) $(vorbislibs) $(avahilibs)
|
-lFLAC $(flacogglibs) $(vorbislibs) $(avahilibs)
|
||||||
|
|
||||||
minidlnad_LDFLAGS = @STATIC_LDFLAGS@
|
|
||||||
|
|
||||||
testupnpdescgen_SOURCES = testupnpdescgen.c upnpdescgen.c
|
testupnpdescgen_SOURCES = testupnpdescgen.c upnpdescgen.c
|
||||||
testupnpdescgen_LDADD = \
|
testupnpdescgen_LDADD = \
|
||||||
@LIBJPEG_LIBS@ \
|
@LIBJPEG_LIBS@ \
|
||||||
|
37
configure.ac
37
configure.ac
@ -69,6 +69,7 @@ AC_FUNC_FORK
|
|||||||
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
|
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
|
||||||
AC_CHECK_FUNCS([gethostname getifaddrs gettimeofday inet_ntoa memmove memset mkdir realpath select sendfile setlocale socket strcasecmp strchr strdup strerror strncasecmp strpbrk strrchr strstr strtol strtoul])
|
AC_CHECK_FUNCS([gethostname getifaddrs gettimeofday inet_ntoa memmove memset mkdir realpath select sendfile setlocale socket strcasecmp strchr strdup strerror strncasecmp strpbrk strrchr strstr strtol strtoul])
|
||||||
AC_CHECK_DECLS([SEEK_HOLE])
|
AC_CHECK_DECLS([SEEK_HOLE])
|
||||||
|
AC_SEARCH_LIBS([clock_gettime], [rt], [AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [use clock_gettime])],)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Check for struct ip_mreqn
|
# Check for struct ip_mreqn
|
||||||
@ -144,7 +145,6 @@ AC_COMPILE_IFELSE(
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
AC_SEARCH_LIBS([clock_gettime], [rt], [AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [use clock_gettime])],)
|
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_CHECK_HEADER(linux/netlink.h,
|
AC_CHECK_HEADER(linux/netlink.h,
|
||||||
@ -411,10 +411,10 @@ for dir in "" /usr/local $SEARCH_DIR; do
|
|||||||
if test -n "$dir"; then
|
if test -n "$dir"; then
|
||||||
LDFLAGS="$LDFLAGS -L$dir/lib"
|
LDFLAGS="$LDFLAGS -L$dir/lib"
|
||||||
fi
|
fi
|
||||||
AC_CHECK_LIB([id3tag], [id3_file_open], [LIBID3TAG_LIBS="-lid3tag"], [unset ac_cv_lib_id3tag_id3_file_open; LDFLAGS="$LDFLAGS_SAVE"; continue])
|
AC_CHECK_LIB([id3tag -lz], [id3_file_open], [LIBID3TAG_LIBS="-lid3tag -lz"], [unset ac_cv_lib_id3tag_id3_file_open; LDFLAGS="$LDFLAGS_SAVE"; continue])
|
||||||
break
|
break
|
||||||
done
|
done
|
||||||
test x"$ac_cv_lib_id3tag_id3_file_open" = x"yes" || AC_MSG_ERROR([Could not find libid3tag])
|
test x"$ac_cv_lib_id3tag__lz___id3_file_open" = x"yes" || AC_MSG_ERROR([Could not find libid3tag])
|
||||||
AC_SUBST(LIBID3TAG_LIBS)
|
AC_SUBST(LIBID3TAG_LIBS)
|
||||||
|
|
||||||
LDFLAGS_SAVE="$LDFLAGS"
|
LDFLAGS_SAVE="$LDFLAGS"
|
||||||
@ -435,20 +435,17 @@ for dir in "" /usr/local $SEARCH_DIR; do
|
|||||||
if test -n "$dir"; then
|
if test -n "$dir"; then
|
||||||
LDFLAGS="$LDFLAGS -L$dir/lib"
|
LDFLAGS="$LDFLAGS -L$dir/lib"
|
||||||
fi
|
fi
|
||||||
AC_CHECK_LIB([avformat], [av_open_input_file], [LIBAVFORMAT_LIBS="-lavformat"],
|
AC_CHECK_LIB([avformat -lavcodec -lavutil -lz], [avformat_open_input], [LIBAVFORMAT_LIBS="-lavformat -lavcodec -lavutil -lz"],
|
||||||
[AC_CHECK_LIB([avformat], [avformat_open_input], [LIBAVFORMAT_LIBS="-lavformat"],
|
[AC_CHECK_LIB([avformat -lavcodec -lavutil -lz], [av_open_input_file], [LIBAVFORMAT_LIBS="-lavformat -lavcodec -lavutil -lz"],
|
||||||
[unset ac_cv_lib_avformat_av_open_input_file; unset ac_cv_lib_avformat_avformat_open_input; LDFLAGS="$LDFLAGS_SAVE"; continue])])
|
[unset ac_cv_lib_avformat_av_open_input_file; unset ac_cv_lib_avformat_avformat_open_input; LDFLAGS="$LDFLAGS_SAVE"; continue])])
|
||||||
break
|
break
|
||||||
done
|
done
|
||||||
if test x"$ac_cv_lib_avformat_av_open_input_file" != x"yes" &&
|
if test x"$ac_cv_lib_avformat__lavcodec__lavutil__lz___av_open_input_file" != x"yes" &&
|
||||||
test x"$ac_cv_lib_avformat_avformat_open_input" != x"yes"; then
|
test x"$ac_cv_lib_avformat__lavcodec__lavutil__lz___avformat_open_input" != x"yes"; then
|
||||||
AC_MSG_ERROR([Could not find libavformat - part of ffmpeg])
|
AC_MSG_ERROR([Could not find libavformat - part of ffmpeg])
|
||||||
fi
|
fi
|
||||||
AC_SUBST(LIBAVFORMAT_LIBS)
|
AC_SUBST(LIBAVFORMAT_LIBS)
|
||||||
|
|
||||||
AC_CHECK_LIB(avutil ,[av_rescale_q], [LIBAVUTIL_LIBS="-lavutil"], [AC_MSG_ERROR([Could not find libavutil - part of ffmpeg])])
|
|
||||||
AC_SUBST(LIBAVUTIL_LIBS)
|
|
||||||
|
|
||||||
AC_CHECK_LIB(pthread, pthread_create)
|
AC_CHECK_LIB(pthread, pthread_create)
|
||||||
|
|
||||||
# test if we have vorbisfile
|
# test if we have vorbisfile
|
||||||
@ -609,10 +606,22 @@ AC_MSG_CHECKING([whether to build a static binary executable])
|
|||||||
AC_ARG_ENABLE(static,
|
AC_ARG_ENABLE(static,
|
||||||
[ --enable-static build a static binary executable],[
|
[ --enable-static build a static binary executable],[
|
||||||
if test "$enableval" = "yes"; then
|
if test "$enableval" = "yes"; then
|
||||||
STATIC_CFLAGS="-DSTATIC"
|
CFLAGS="$CFLAGS -DSTATIC"
|
||||||
AC_SUBST(STATIC_CFLAGS)
|
LDFLAGS="$LDFLAGS -static"
|
||||||
STATIC_LDFLAGS="-Wl,-Bstatic"
|
AC_MSG_RESULT([yes])
|
||||||
AC_SUBST(STATIC_LDFLAGS)
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
fi
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether to enable LTO])
|
||||||
|
AC_ARG_ENABLE(lto,
|
||||||
|
[ --enable-lto enable link-time optimization],[
|
||||||
|
if test "$enableval" = "yes"; then
|
||||||
|
CFLAGS="$CFLAGS -flto"
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
|
@ -137,7 +137,7 @@ init_source(j_decompress_ptr cinfo)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static boolean
|
||||||
fill_input_buffer(j_decompress_ptr cinfo)
|
fill_input_buffer(j_decompress_ptr cinfo)
|
||||||
{
|
{
|
||||||
struct my_src_mgr *src = (void *)cinfo->src;
|
struct my_src_mgr *src = (void *)cinfo->src;
|
||||||
|
@ -1641,7 +1641,7 @@ SendResp_resizedimg(struct upnphttp * h, char * object)
|
|||||||
char *resolution = NULL;
|
char *resolution = NULL;
|
||||||
char *key, *val;
|
char *key, *val;
|
||||||
char *saveptr, *item = NULL;
|
char *saveptr, *item = NULL;
|
||||||
int rotate;
|
int rotate = 0;
|
||||||
int pixw = 0, pixh = 0;
|
int pixw = 0, pixh = 0;
|
||||||
long long id;
|
long long id;
|
||||||
int rows=0, chunked, ret;
|
int rows=0, chunked, ret;
|
||||||
@ -1661,7 +1661,8 @@ SendResp_resizedimg(struct upnphttp * h, char * object)
|
|||||||
{
|
{
|
||||||
file_path = result[3];
|
file_path = result[3];
|
||||||
resolution = result[4];
|
resolution = result[4];
|
||||||
rotate = result[5] ? atoi(result[5]) : 0;
|
if (result[5])
|
||||||
|
rotate = atoi(result[5]);
|
||||||
}
|
}
|
||||||
if( !file_path || !resolution || (access(file_path, F_OK) != 0) )
|
if( !file_path || !resolution || (access(file_path, F_OK) != 0) )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user