struct list_head *next, *prev;
};
-#define LIST_HEAD(name) \
- struct list_head name = { .next = &(name), .prev = &(name) }
-
#define INIT_LIST_HEAD(ptr) do { \
(ptr)->next = (ptr); (ptr)->prev = (ptr); \
} while (0)
static void *xinfo_tree; /* for tsearch/tfind */
static void *netns_tree;
-static LIST_HEAD(unix_ipcs);
+static struct list_head unix_ipcs;
static void *unix_oneway_ipc_tree; /* for tsearch/tfind */
struct iface {
DIR *dir;
struct dirent *d;
+ INIT_LIST_HEAD(&unix_ipcs);
+
self_netns_fd = open("/proc/self/ns/net", O_RDONLY);
if (self_netns_fd < 0)