Michal Privoznik wrote: > 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@xxxxxxxxx> > Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> Reviewed-by: Roman Bogorodskiy <bogorodskiy@xxxxxxxxx> > --- > tools/nss/libvirt_nss.c | 6 +++--- > tools/nss/libvirt_nss.h | 4 ++-- > 2 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/tools/nss/libvirt_nss.c b/tools/nss/libvirt_nss.c > index 3b89f72742..6331c65131 100644 > --- a/tools/nss/libvirt_nss.c > +++ b/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 a/tools/nss/libvirt_nss.h b/tools/nss/libvirt_nss.h > index 95ebafdc71..121b9e8722 100644 > --- a/tools/nss/libvirt_nss.h > +++ b/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 */ > -- > 2.26.2 > Roman Bogorodskiy
Attachment:
signature.asc
Description: PGP signature