Whamcloud - gitweb
Branch HEAD
authoradilger <adilger>
Thu, 11 Aug 2005 20:03:10 +0000 (20:03 +0000)
committeradilger <adilger>
Thu, 11 Aug 2005 20:03:10 +0000 (20:03 +0000)
Disable hlist macros unless compiling liblustre.  In b1_4 there are compat
macros in lustre_compat25.h that handle difference between 2.4 and 2.6
kernels instead of defining replacement macros.

lnet/include/libcfs/list.h

index 6eadb45..5520f75 100644 (file)
@@ -285,6 +285,7 @@ static inline void list_splice_init(struct list_head *list,
 #endif
 
 /* hlist stuff */
+#ifndef __KERNEL__
 #define HLIST_HEAD_INIT { .first = NULL }
 #define HLIST_HEAD(name) struct hlist_head name = {  .first = NULL }
 #define INIT_HLIST_HEAD(ptr) ((ptr)->first = NULL)
@@ -395,6 +396,7 @@ static inline void hlist_add_head(struct hlist_node *n, struct hlist_head *h)
         h->first = n;
         n->pprev = &h->first;
 }
-#endif
+#endif /* __KERNEL__ */
+#endif /* HLIST_HEAD */
 
 #endif /* __LIBCFS_LUSTRE_LIST_H__ */