[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] nss: use more strict check for automatic enabling



Currently nss plugin is automatically enabled if nss.h header exists and
--without-nss-plugin is not specified. However, presence of the nss.h
header does not guarantee a compatible interface, so check for struct
gaih_addrtuple to make sure it's enabled only on platforms where it
could be built.
---
 m4/virt-nss.m4 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/m4/virt-nss.m4 b/m4/virt-nss.m4
index 3fa4ad3..bc054db 100644
--- a/m4/virt-nss.m4
+++ b/m4/virt-nss.m4
@@ -25,12 +25,14 @@ AC_DEFUN([LIBVIRT_CHECK_NSS],[
 
   fail=0
   if test "x$with_nss_plugin" != "xno" ; then
-    AC_CHECK_HEADERS([nss.h], [
+    AC_CHECK_TYPE([struct gaih_addrtuple], [
         with_nss_plugin=yes
       ],[
         if test "x$with_nss_plugin" = "xyes" ; then
           fail = 1
         fi
+      ],[
+        #include <nss.h>
       ])
 
     if test $fail = 1 ; then
-- 
2.4.6


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]