[ovs-dev] [PATCH 6/9] compat: Add FIELD_SIZEOF macro
Greg Rose
gvrose8192 at gmail.com
Mon Feb 24 22:42:35 UTC 2020
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 <gvrose8192 at gmail.com>
---
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
More information about the dev
mailing list