nss: FreeBSD support

* tools/nss/libvirt_nss.[ch]: add BSD-comptabile wrappers and
   register via the nss_module_register() interface
 * m4/virt-nss.m4: add checks if we're building NSS for FreeBSD
 * tools/Makefile.am: handle target library name differences, as
   Linux needs libnss_libvirt.so.2 and FreeBSD needs
   nss_libvirt.so.1. Also, different syms files have to be used
   as Linux needs to export all the methods while FreeBSD
   only needs to have nss_module_register()
 * tests/nsstest.c, tests/nssmock.c: s/__linux__/NSS/
 * tests/nssmock.c: pass int instead of mode_t to va_arg() to please
   gcc 4.8
 * libvirt_nss_bsd.syms: FreeBSD syms file
This commit is contained in:
Roman Bogorodskiy
2016-03-27 21:07:10 +03:00
parent e23a640c42
commit 45408cd892
7 changed files with 189 additions and 10 deletions

View File

@@ -22,7 +22,7 @@
#include "testutils.h"
#ifdef __linux__
#ifdef NSS
# include <stdbool.h>
# include <arpa/inet.h>