Page MenuHomeFreeBSD

D49999.id.diff
No OneTemporary

D49999.id.diff

diff --git a/sys/compat/linuxkpi/common/include/linux/container_of.h b/sys/compat/linuxkpi/common/include/linux/container_of.h
--- a/sys/compat/linuxkpi/common/include/linux/container_of.h
+++ b/sys/compat/linuxkpi/common/include/linux/container_of.h
@@ -41,6 +41,14 @@
(type *)((uintptr_t)__p - offsetof(type, member)); \
})
+#define container_of_const(ptr, type, member) \
+ _Generic(ptr, \
+ const typeof(*(ptr)) *: \
+ (const type *)container_of(ptr, type, member), \
+ default: \
+ container_of(ptr, type, member) \
+ )
+
#define typeof_member(type, member) __typeof(((type *)0)->member)
#endif

File Metadata

Mime Type
text/plain
Expires
Wed, Jul 22, 6:19 PM (25 m, 2 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35375943
Default Alt Text
D49999.id.diff (642 B)

Event Timeline