vlc | branch: master | Thomas Guillem <[email protected]> | Tue Oct 23 14:09:32 2018 +0200| [80edb355d9e0685bdb73bc30e83c792cd536ff8f] | committer: Thomas Guillem
contrib: dsm: fix Android nl_langinfo detection Fixes Android NDK 17+ build > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=80edb355d9e0685bdb73bc30e83c792cd536ff8f --- ...uild-fix-nl_langinfo-detection-on-Android.patch | 55 ++++++++++++++++++++++ contrib/src/libdsm/rules.mak | 1 + 2 files changed, 56 insertions(+) diff --git a/contrib/src/libdsm/0001-build-fix-nl_langinfo-detection-on-Android.patch b/contrib/src/libdsm/0001-build-fix-nl_langinfo-detection-on-Android.patch new file mode 100644 index 0000000000..d022f0d564 --- /dev/null +++ b/contrib/src/libdsm/0001-build-fix-nl_langinfo-detection-on-Android.patch @@ -0,0 +1,55 @@ +From 68dc318713f7ca577e9d5bb4088d31851944b0fa Mon Sep 17 00:00:00 2001 +From: Victorien Le Couviour--Tuffet <[email protected]> +Date: Tue, 11 Sep 2018 17:51:04 +0200 +Subject: [PATCH] build: fix nl_langinfo detection on Android + +The android NDK 17 provides the header, but not necessarily the +nl_langinfo function. + +Signed-off-by: Thomas Guillem <[email protected]> +--- + configure.ac | 4 ++-- + src/smb_utils.c | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index e0e40c9..17757d5 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -107,9 +107,9 @@ AC_CHECK_DECLS([CLOCK_MONOTONIC],,,[ + AC_REPLACE_FUNCS([strlcpy]) + AC_REPLACE_FUNCS([strndup]) + AC_REPLACE_FUNCS([clock_gettime]) +-AC_CHECK_FUNCS([pipe _pipe getifaddrs]) ++AC_CHECK_FUNCS([pipe _pipe getifaddrs nl_langinfo]) + +-AC_CHECK_HEADERS([bsd/string.h langinfo.h alloca.h sys/queue.h arpa/inet.h sys/socket.h sys/time.h ifaddrs.h]) ++AC_CHECK_HEADERS([bsd/string.h alloca.h sys/queue.h arpa/inet.h sys/socket.h sys/time.h ifaddrs.h]) + + ## Configure random device path + AC_ARG_WITH([urandom], +diff --git a/src/smb_utils.c b/src/smb_utils.c +index a64c1db..3e8a420 100644 +--- a/src/smb_utils.c ++++ b/src/smb_utils.c +@@ -40,7 +40,7 @@ + #include <string.h> + #include <errno.h> + +-#if HAVE_LANGINFO_H && !defined( __APPLE__ ) ++#if HAVE_NL_LANGINFO && !defined( __APPLE__ ) + # include <langinfo.h> + #endif + +@@ -51,7 +51,7 @@ static const char *current_encoding() + { + #if defined( __APPLE__ ) + return "UTF8"; +-#elif !HAVE_LANGINFO_H ++#elif !HAVE_NL_LANGINFO + return "UTF-8"; + #else + static int locale_set = 0; +-- +2.19.1 + diff --git a/contrib/src/libdsm/rules.mak b/contrib/src/libdsm/rules.mak index 8c75ed7f9e..8239653f31 100644 --- a/contrib/src/libdsm/rules.mak +++ b/contrib/src/libdsm/rules.mak @@ -20,6 +20,7 @@ endif libdsm: libdsm-$(LIBDSM_VERSION).tar.gz .sum-libdsm $(UNPACK) + $(APPLY) $(SRC)/libdsm/0001-build-fix-nl_langinfo-detection-on-Android.patch $(MOVE) DEPS_libdsm = libtasn1 iconv _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
