Use explicit type-casting in hlist_del() for C++ compatibility
/usr/local/include/osmocom/core/linuxlist.h:479:12: error: invalid conversion from ‘void*’ to ‘hlist_node*’ [-fpermissive]
479 | n->next = LLIST_POISON1;
Fixes: I8ef73a62fe9846ce45058eb21cf999dd3eed5741
Change-Id: I75b0a5fe097562007c53987d8d41811e9f35798d
diff --git a/include/osmocom/core/linuxlist.h b/include/osmocom/core/linuxlist.h
index 5ccd462..f28f88b 100644
--- a/include/osmocom/core/linuxlist.h
+++ b/include/osmocom/core/linuxlist.h
@@ -476,8 +476,8 @@
static inline void hlist_del(struct hlist_node *n)
{
__hlist_del(n);
- n->next = LLIST_POISON1;
- n->pprev = LLIST_POISON2;
+ n->next = (struct hlist_node *)LLIST_POISON1;
+ n->pprev = (struct hlist_node **)LLIST_POISON2;
}
/*! Delete the specified hlist_node from its list and initialize.