Symbol missing in nss_libvirt.so

Michal Privoznik mprivozn at redhat.com
Tue Sep 1 07:53:37 UTC 2020


On 9/1/20 5:20 AM, Roman Bogorodskiy wrote:
> WITH_BSD_NSS value is properly set:
> 
> $ grep WITH_BSD_NSS build/meson-config.h
> #define WITH_BSD_NSS 1
> $

Ah, I think this is the problem. In libvirt_nss.c we check for 
HAVE_BSD_NSS. Can you please check if something like this fixes the problem:


diff --git i/tools/nss/libvirt_nss.c w/tools/nss/libvirt_nss.c
index 3b89f72742..6331c65131 100644
--- i/tools/nss/libvirt_nss.c
+++ w/tools/nss/libvirt_nss.c
@@ -37,7 +37,7 @@
  #include <time.h>


-#if defined(HAVE_BSD_NSS)
+#if defined(WITH_BSD_NSS)
  # include <nsswitch.h>
  #endif

@@ -451,7 +451,7 @@ NSS_NAME(gethostbyname4)(const char *name, struct 
gaih_addrtuple **pat,
  }
  #endif /* HAVE_STRUCT_GAIH_ADDRTUPLE */

-#if defined(HAVE_BSD_NSS)
+#if defined(WITH_BSD_NSS)
  NSS_METHOD_PROTOTYPE(_nss_compat_getaddrinfo);
  NSS_METHOD_PROTOTYPE(_nss_compat_gethostbyname2_r);

@@ -598,4 +598,4 @@ nss_module_register(const char *name 
__attribute__((unused)),
      *unregister = NULL;
      return methods;
  }
-#endif /* HAVE_BSD_NSS */
+#endif /* WITH_BSD_NSS */
diff --git i/tools/nss/libvirt_nss.h w/tools/nss/libvirt_nss.h
index 95ebafdc71..121b9e8722 100644
--- i/tools/nss/libvirt_nss.h
+++ w/tools/nss/libvirt_nss.h
@@ -84,8 +84,8 @@ NSS_NAME(gethostbyname4)(const char *name, struct 
gaih_addrtuple **pat,
                           int *herrnop, int32_t *ttlp);
  #endif /* HAVE_STRUCT_GAIH_ADDRTUPLE */

-#if defined(HAVE_BSD_NSS)
+#if defined(WITH_BSD_NSS)
  ns_mtab*
  nss_module_register(const char *name, unsigned int *size,
                      nss_module_unregister_fn *unregister);
-#endif /* HAVE_BSD_NSS */
+#endif /* WITH_BSD_NSS */


Michal




More information about the libvir-list mailing list