The FIELD_SIZEOF macro is removed in Linux kernel release 5.5 but
is still needed in our out of tree kernel module for compatibility
with older kernels.

Signed-off-by: Greg Rose <[email protected]>
---
 datapath/linux/compat/include/linux/kernel.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/datapath/linux/compat/include/linux/kernel.h 
b/datapath/linux/compat/include/linux/kernel.h
index 2e81abc..8529b1d 100644
--- a/datapath/linux/compat/include/linux/kernel.h
+++ b/datapath/linux/compat/include/linux/kernel.h
@@ -32,4 +32,8 @@
 #define U32_MAX                ((u32)~0U)
 #endif
 
+#ifndef FIELD_SIZEOF
+#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
+#endif
+
 #endif /* linux/kernel.h */
-- 
1.8.3.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to