+
+void cfs_arch_init(void);
+
+#ifndef container_of_safe
+/**
+ * container_of_safe - cast a member of a structure out to the containing structure
+ * @ptr: the pointer to the member.
+ * @type: the type of the container struct this is embedded in.
+ * @member: the name of the member within the struct.
+ *
+ * If IS_ERR_OR_NULL(ptr), ptr is returned unchanged.
+ *
+ * Note: Copied from Linux 5.6, with BUILD_BUG_ON_MSG section removed.
+ */
+#define container_of_safe(ptr, type, member) ({ \
+ void *__mptr = (void *)(ptr); \
+ IS_ERR_OR_NULL(__mptr) ? ERR_CAST(__mptr) : \
+ ((type *)(__mptr - offsetof(type, member))); })
+#endif
+
+/*
+ * Linux v4.15-rc2-5-g4229a470175b added sizeof_field()
+ * Linux v5.5-rc4-1-g1f07dcc459d5 removed FIELD_SIZEOF()
+ * Proved a sizeof_field in terms of FIELD_SIZEOF() when one is not provided
+ */
+#ifndef sizeof_field
+#define sizeof_field(type, member) FIELD_SIZEOF(type, member)
+#endif
+
+#ifndef HAVE_KALLSYMS_LOOKUP_NAME
+static inline void *kallsyms_lookup_name(char *func)
+{
+ return NULL;
+}
+#endif
+
+#endif /* __LIBCFS_LINUX_MISC_H__ */