Index: src/core/list.h
--- src/core/list.h.orig
+++ src/core/list.h
@@ -33,6 +33,8 @@
 #ifndef _SER_LIST_H
 #define	_SER_LIST_H
 
+// #include <sys/queue.h>
+
 /* #include <sys/cdefs.h> - not needed and not present on all the systems */
 
 /*
@@ -133,6 +135,7 @@ struct qm_trace {
 #define	TRASHIT(x)
 #endif	/* QUEUE_MACRO_DEBUG */
 
+#ifndef SLIST_HEAD
 /*
  * Singly-linked List declarations.
  */
@@ -204,7 +207,9 @@ struct {								\
 #define	SLIST_REMOVE_HEAD(head, field) do {				\
 	SLIST_FIRST((head)) = SLIST_NEXT(SLIST_FIRST((head)), field);	\
 } while (0)
+#endif /* SLIST_HEAD */
 
+#ifndef STAILQ_HEAD
 /*
  * Singly-linked Tail queue declarations.
  */
@@ -299,7 +304,9 @@ struct {								\
 	     STAILQ_NEXT(STAILQ_FIRST((head)), field)) == NULL)		\
 		(head)->stqh_last = &STAILQ_FIRST((head));		\
 } while (0)
+#endif /* STAILQ_HEAD */
 
+#ifndef LIST_HEAD
 /*
  * List declarations.
  */
@@ -513,5 +520,6 @@ struct {								\
 	TRASHIT((elm)->field.tqe_prev);					\
 	QMD_TRACE_ELEM(&(elm)->field);					\
 } while (0)
+#endif /* LIST_HEAD */
 
 #endif /* !_LIST_H */
