Print this page
2976 remove useless offsetof() macros

*** 27,36 **** --- 27,37 ---- #include <sys/ksynch.h> #include <sys/cmn_err.h> #include <sys/kmem.h> #include <sys/conf.h> #include <sys/errno.h> + #include <sys/sysmacros.h> #ifdef _SunOS_5_6 /* * on 2.6 both dki_lock.h and rpc/types.h define bool_t so we * define enum_t here as it is all we need from rpc/types.h
*** 5637,5653 **** mutex_exit(&rdc_conf_lock); return (rc); } - /* - * Yet another standard thing that is not standard ... - */ - #ifndef offsetof - #define offsetof(s, m) ((size_t)(&((s *)0)->m)) - #endif - static int rdc_status(void *arg, int mode, rdc_config_t *uparms, spcs_s_info_t kstatus) { rdc_k_info_t *krdc; rdc_u_info_t *urdc; --- 5638,5647 ----