Print this page
2976 remove useless offsetof() macros

@@ -31,10 +31,11 @@
 #include <sys/conf.h>
 #include <sys/cmn_err.h>
 #include <sys/modctl.h>
 #include <sys/cred.h>
 #include <sys/ddi.h>
+#include <sys/sysmacros.h>
 #include <sys/unistat/spcs_s.h>
 #include <sys/unistat/spcs_s_k.h>
 #include <sys/unistat/spcs_errors.h>
 
 #include <sys/nsc_thread.h>

@@ -519,18 +520,10 @@
         }
 
         return (0);
 }
 
-
-/*
- * Yet another standard thing that is not standard ...
- */
-#ifndef offsetof
-#define offsetof(s, m)  ((size_t)(&((s *)0)->m))
-#endif
-
 /*
  * Build a 32bit rdc_set structure and copyout to the user level.
  */
 int
 rdc_status_copy32(const void *arg, void *usetp, size_t size, int mode)