diff --git a/src/nm-daemon-helper/nm-daemon-helper.c b/src/nm-daemon-helper/nm-daemon-helper.c index 3a95c6829f..21a71e3c4a 100644 --- a/src/nm-daemon-helper/nm-daemon-helper.c +++ b/src/nm-daemon-helper/nm-daemon-helper.c @@ -6,7 +6,9 @@ #include #include #include +#if defined(__GLIBC__) #include +#endif #include "libnm-std-aux/nm-std-aux.h" @@ -68,7 +70,9 @@ cmd_resolve_address(void) return RETURN_INVALID_ARGS; memset(&sockaddr, 0, sizeof(sockaddr)); +#if defined(__GLIBC__) __nss_configure_lookup("hosts", "dns"); +#endif if (inet_pton(AF_INET, address, &sockaddr.in.sin_addr) == 1) { sockaddr.in.sin_family = AF_INET;