nss: Use macro to generate public API names

The name of the exported functions for an NSS module is quite
fixed, it is derived from the module name:

  _nss_$module_$function

Since we will create another NSS module with very similar
implementation we might as well generate the function names at
the compile time.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Michal Privoznik committed 2016-12-06 13:33:18 +01:00
1 parent 1f9db235e7
commit 30efb515ce
4 files changed
+42 -41

No files matched your search

+1 -1
View File
@@ -33,7 +33,7 @@ int main(int argc ATTRIBUTE_UNUSED,
* the fact this test has been built successfully means
* there's no linkage problem and therefore success is
* returned. */
_nss_libvirt_gethostbyname_r(NULL, NULL, NULL, 0, &err, &herrno);
NSS_NAME(gethostbyname)(NULL, NULL, NULL, 0, &err, &herrno);
return EXIT_SUCCESS;
}