[ovs-dev,6/9] compat: Add FIELD_SIZEOF macro
diff mbox series

Message ID 1582584158-16348-6-git-send-email-gvrose8192@gmail.com
State Superseded
Headers show
Series
  • [ovs-dev,1/9] acinclude: Enable Linux kernel 5.5
Related show

Commit Message

Greg Rose Feb. 24, 2020, 10:42 p.m. UTC
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@gmail.com>
---
 datapath/linux/compat/include/linux/kernel.h | 4 ++++
 1 file changed, 4 insertions(+)

Patch
diff mbox series

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 */