summaryrefslogtreecommitdiff
path: root/uts/common/sys/sysmacros.h
diff options
context:
space:
mode:
Diffstat (limited to 'uts/common/sys/sysmacros.h')
-rw-r--r--uts/common/sys/sysmacros.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/uts/common/sys/sysmacros.h b/uts/common/sys/sysmacros.h
index 71042eba85ae..89a672db2f8c 100644
--- a/uts/common/sys/sysmacros.h
+++ b/uts/common/sys/sysmacros.h
@@ -25,8 +25,6 @@
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
- *
- * Copyright 2011, 2012 Nexenta Systems, Inc. All rights reserved.
*/
#ifndef _SYS_SYSMACROS_H
@@ -366,18 +364,12 @@ extern unsigned char bcd_to_byte[256];
#error One of _BIT_FIELDS_LTOH or _BIT_FIELDS_HTOL must be defined
#endif /* _BIT_FIELDS_LTOH */
+#if defined(_KERNEL) && !defined(_KMEMUSER) && !defined(offsetof)
+
/* avoid any possibility of clashing with <stddef.h> version */
-#if defined(_KERNEL) && !defined(_KMEMUSER)
-#if !defined(offsetof)
#define offsetof(s, m) ((size_t)(&(((s *)0)->m)))
-#endif /* !offsetof */
-
-#define container_of(m, s, name) \
- (void *)((uintptr_t)(m) - (uintptr_t)offsetof(s, name))
-
-#define ARRAY_SIZE(x) (sizeof (x) / sizeof (x[0]))
-#endif /* _KERNEL, !_KMEMUSER */
+#endif
#ifdef __cplusplus
}