]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
nss: Finish renaming of HAVE_BSD_NSS macro
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 1 Sep 2020 09:19:26 +0000 (11:19 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 1 Sep 2020 09:39:49 +0000 (11:39 +0200)
When switching to meson, some of HAVE_* macros were renamed to
WITH_ because they did not reflect whether the build platform has
or doesn't have something, but whether we are building with some
functionality turned on or off. This is the case with
HAVE_BSD_NSS macro too. As a result, the NSS plugin built on BSD
did not expose nss_module_register() function which made the
plugin unusable:

https://www.redhat.com/archives/libvir-list/2020-September/msg00000.html

Fixes: c74268705557a6781788ba011492c15df2e3df11
Reported-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
tools/nss/libvirt_nss.c
tools/nss/libvirt_nss.h

index 3b89f727428c3fb78ba4822c1e6543c7434f3770..6331c65131345af1bc1b02567cd4426ac1120541 100644 (file)
@@ -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 */
index 95ebafdc711d8cf1167f75cd135a84b6757d7f55..121b9e87227d1c69a538960a742dde30960ed077 100644 (file)
@@ -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 */