Those autoconf tests assume that the target libc doesn't have
GNU-compatible malloc and realloc implementations when cross-compiling,
which breaks compilation.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
# Checks for library functions.
AC_HEADER_MAJOR
# Checks for library functions.
AC_HEADER_MAJOR
-AC_FUNC_MALLOC
-AC_FUNC_REALLOC
+AS_IF([test "x$cross_compiling" != "xyes"],
+ [
+ AC_FUNC_MALLOC
+ AC_FUNC_REALLOC
+ ])
AC_CHECK_FUNCS([memset strerror strrchr strtoul])
AC_CONFIG_FILES([
AC_CHECK_FUNCS([memset strerror strrchr strtoul])
AC_CONFIG_FILES([