vlc/vlc-3.0 | branch: master | Natanael Copa <[email protected]> | Wed Dec 20 12:21:02 2017 +0000| [dd8f3a5128082fcf7922301dc9f2f83613248510] | committer: Jean-Baptiste Kempf
configure: test for getaddrinfo_a and libanl Test for the existence of the GNU extension getaddrinf_a and libanl instead of assuming that every Linux has it. Fall back to posix variant if they are missing. This fixes build with musl libc which does not implement this GNU extension. Fixes #19320 Signed-off-by: Natanael Copa <[email protected]> Signed-off-by: Jean-Baptiste Kempf <[email protected]> (cherry picked from commit 01fd9fe4c7f6c5558f7345f38abf0152e17853ab) Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=dd8f3a5128082fcf7922301dc9f2f83613248510 --- configure.ac | 5 +++++ src/Makefile.am | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 90b666b2e4..a310b0d635 100644 --- a/configure.ac +++ b/configure.ac @@ -330,6 +330,7 @@ AM_CONDITIONAL(HAVE_OSX, test "${HAVE_OSX}" = "1") AM_CONDITIONAL(HAVE_TVOS, test "${HAVE_TVOS}" = "1") AM_CONDITIONAL(HAVE_NACL, test "${SYS}" = "nacl") +AM_CONDITIONAL(HAVE_LIBANL, test "${HAVE_LIBANL}" = "1") AM_CONDITIONAL(HAVE_WIN32, test "${SYS}" = "mingw32") AM_CONDITIONAL(HAVE_WIN64, test "${HAVE_WIN64}" = "1") dnl Only used for the packaging @@ -759,6 +760,10 @@ dnl __STDC_NO_THREADS__ can't be trusted on some platforms. dnl check for its availability explicitely AC_CHECK_HEADERS([threads.h]) +AC_CHECK_LIB([anl],[getaddrinfo_a],[ + AC_DEFINE(HAVE_LIBANL, 1, [Define to 1 if you have the anl library]) +]) + dnl Check for dynamic plugins LIBDL="" have_dynamic_objects="no" diff --git a/src/Makefile.am b/src/Makefile.am index 7a4fe5dafd..044169156c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -430,8 +430,11 @@ if HAVE_LINUX libvlccore_la_SOURCES += \ linux/cpu.c \ linux/dirs.c \ - linux/getaddrinfo.c \ linux/thread.c +endif +if HAVE_LIBANL +libvlccore_la_SOURCES += \ + linux/getaddrinfo.c libvlccore_la_LIBADD += -lanl else libvlccore_la_SOURCES += \ _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
