[XS] Change in osmo-ggsn[master]: configure: search libresolv for res_9_init
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/43584?usp=email ) Change subject: configure: search libresolv for res_9_init ...................................................................... configure: search libresolv for res_9_init sgsnemu points the resolver at the DNS server received in the PCO by writing to the resolver state from <resolv.h>. glibc keeps that state in libc, so nothing extra is needed on GNU/Linux. Darwin keeps it in libresolv and renames the interface to the BIND 9 symbols: /usr/include/resolv.h has "#define res_init res_9_init" and "#define __res_state __res_9_state". The link of sgsnemu then fails with Undefined symbols for architecture arm64: "___res_9_state" Add AC_SEARCH_LIBS([res_9_init], [resolv]) so -lresolv is picked up where the symbol lives there. res_9_init is deliberately the name searched for, rather than res_init: it exists only on the platforms that carry this renaming, so on glibc the search finds nothing, LIBS stays as it was and the link line does not change. Change-Id: I97787b051c712c5cfdb241cb7931a214d5a87630 Signed-off-by: Andrei Gosman <andrei.gosman@gmail.com> --- M configure.ac 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index cbb6b66..3283aae 100644 --- a/configure.ac +++ b/configure.ac @@ -152,6 +152,10 @@ # check for getopt in standard library adl_FUNC_GETOPT_LONG +# sgsnemu sets the resolver state (_res) from <resolv.h>. glibc keeps it in +# libc; Darwin exports it from libresolv under BIND 9 names (res_9_*). +AC_SEARCH_LIBS([res_9_init], [resolv]) + AM_INIT_AUTOMAKE([foreign]) PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.14.2) -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/43584?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: I97787b051c712c5cfdb241cb7931a214d5a87630 Gerrit-Change-Number: 43584 Gerrit-PatchSet: 1 Gerrit-Owner: Andrei G <andrei.gosman@gmail.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: pespin <pespin@sysmocom.de>
participants (1)
-
pespin