Print this page
2976 remove useless offsetof() macros

@@ -21,10 +21,12 @@
 /*
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
+#include <stddef.h>
+
 #include <sys/types.h>
 #include <sys/mdb_modapi.h>
 
 #include <sys/nsctl/nsctl.h>
 #include <sys/unistat/spcs_s.h>

@@ -34,12 +36,10 @@
 #include <sys/nsctl/dsw.h>
 #include <sys/nsctl/dsw_dev.h>
 
 #include <sys/nsctl/nsvers.h>
 
-#define offsetof(s, m)  ((size_t)(&((s *)0)->m))
-
 
 const mdb_bitmask_t bi_flags_bits[] = {
         { "DSW_GOLDEN", DSW_GOLDEN, DSW_GOLDEN },
         { "DSW_COPYINGP", DSW_COPYINGP, DSW_COPYINGP },
         { "DSW_COPYINGM", DSW_COPYINGM, DSW_COPYINGM },