git: 8b05d84be9e2 - main - LinuxKPI: implement __UNIQUE_ID() macro
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 17 Sep 2026 07:44:24 UTC
The branch main has been updated by wulf:
URL: https://cgit.FreeBSD.org/src/commit/?id=8b05d84be9e288d201e8631750ae180b07311ba7
commit 8b05d84be9e288d201e8631750ae180b07311ba7
Author: Vladimir Kondratyev <wulf@FreeBSD.org>
AuthorDate: 2026-09-17 07:42:12 +0000
Commit: Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2026-09-17 07:42:12 +0000
LinuxKPI: implement __UNIQUE_ID() macro
Requred by drm-kmod v6.12.103
Obtained from: OpenBSD
Reviewed by: bz, emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D59733
---
sys/compat/linuxkpi/common/include/linux/compiler.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sys/compat/linuxkpi/common/include/linux/compiler.h b/sys/compat/linuxkpi/common/include/linux/compiler.h
index 4fcd1f9f342b..cf9494a45553 100644
--- a/sys/compat/linuxkpi/common/include/linux/compiler.h
+++ b/sys/compat/linuxkpi/common/include/linux/compiler.h
@@ -97,4 +97,8 @@
#define __struct_size(_s) __builtin_object_size(_s, 0)
#endif
+#define ____UNIQUE_ID(name, num) __UNIQUE_ID_##name##_##num
+#define ___UNIQUE_ID(name, num) ____UNIQUE_ID(name, num)
+#define __UNIQUE_ID(name) ___UNIQUE_ID(name, __COUNTER__)
+
#endif /* _LINUXKPI_LINUX_COMPILER_H_ */