Whamcloud - gitweb
b=15870
[fs/lustre-release.git] / lnet / lnet / api-ni.c
index 8581ea4..8a86dcc 100644 (file)
@@ -858,6 +858,7 @@ lnet_count_acceptor_nis (lnet_ni_t **first_ni)
          * *first_ni so the acceptor can pass it connections "blind" to retain
          * binary compatibility. */
         int                count = 0;
+#if defined(__KERNEL__) || defined(HAVE_LIBPTHREAD)
         struct list_head  *tmp;
         lnet_ni_t         *ni;
 
@@ -876,6 +877,8 @@ lnet_count_acceptor_nis (lnet_ni_t **first_ni)
         }
         
         LNET_UNLOCK();
+
+#endif /* defined(__KERNEL__) || defined(HAVE_LIBPTHREAD) */
         return count;
 }
 
@@ -993,7 +996,7 @@ lnet_startup_lndnis (void)
         int                nicount = 0;
         char              *nets = lnet_get_networks();
 
-        INIT_LIST_HEAD(&nilist);
+        CFS_INIT_LIST_HEAD(&nilist);
 
         if (nets == NULL)
                 goto failed;