Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/riastradh-drm2]: src/sys/external/bsd/drm2/include/linux Add type-unsafe...
details: https://anonhg.NetBSD.org/src/rev/3756b1a5365d
branches: riastradh-drm2
changeset: 787999:3756b1a5365d
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jul 24 00:49:32 2013 +0000
description:
Add type-unsafe container_of to drm2's <linux/kernel.h>.
diffstat:
sys/external/bsd/drm2/include/linux/kernel.h | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diffs (17 lines):
diff -r d85e408b2427 -r 3756b1a5365d sys/external/bsd/drm2/include/linux/kernel.h
--- a/sys/external/bsd/drm2/include/linux/kernel.h Wed Jul 24 00:49:19 2013 +0000
+++ b/sys/external/bsd/drm2/include/linux/kernel.h Wed Jul 24 00:49:32 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kernel.h,v 1.1.2.2 2013/07/24 00:49:04 riastradh Exp $ */
+/* $NetBSD: kernel.h,v 1.1.2.3 2013/07/24 00:49:32 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -36,4 +36,7 @@
#define __printf __printflike
+#define container_of(PTR, TYPE, FIELD) \
+ ((TYPE *)(((char *)(PTR)) - offsetof(TYPE, FIELD)))
+
#endif /* _LINUX_KERNEL_H_ */
Home |
Main Index |
Thread Index |
Old Index