datapath: Add support for lwtunnel
[cascardo/ovs.git] / datapath / linux / compat / include / linux / list.h
index 18cce8a..4234c17 100644 (file)
@@ -23,4 +23,9 @@
 
 #endif
 
+#ifndef list_first_entry_or_null
+#define list_first_entry_or_null(ptr, type, member) \
+       (!list_empty(ptr) ? list_first_entry(ptr, type, member) : NULL)
+#endif
+
 #endif