Print this page
2976 remove useless offsetof() macros

@@ -54,13 +54,10 @@
 #define SF_DEBUG(level, args)
 #endif
 
 static int sf_bus_config_debug = 0;
 
-/* Why do I have to do this? */
-#define offsetof(s, m)  (size_t)(&(((s *)0)->m))
-
 #include <sys/scsi/scsi.h>
 #include <sys/fc4/fcal.h>
 #include <sys/fc4/fcp.h>
 #include <sys/fc4/fcal_linkapp.h>
 #include <sys/socal_cq_defs.h>

@@ -75,10 +72,11 @@
 #include <sys/proc.h>
 #include <sys/kstat.h>
 #include <sys/devctl.h>
 #include <sys/scsi/targets/ses.h>
 #include <sys/callb.h>
+#include <sys/sysmacros.h>
 
 static int sf_info(dev_info_t *, ddi_info_cmd_t, void *, void **);
 static int sf_attach(dev_info_t *, ddi_attach_cmd_t);
 static int sf_detach(dev_info_t *, ddi_detach_cmd_t);
 static void sf_softstate_unlink(struct sf *);