summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1998-11-17 06:08:16 +0000
committerJason Downs <downsj@cvs.openbsd.org>1998-11-17 06:08:16 +0000
commit8880fe403ed8a026eaa64ffa6e4d2142cdb3a2f3 (patch)
tree0074c387fb148d4496b5d6e72bb9a56ac8d24ac7 /sys/dev
parent67b9faa2a9e119cadd6ecbd2806bc6c7f3fb0e2d (diff)
Move offsetof define.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/adv.c4
-rw-r--r--sys/dev/ic/advlib.h5
2 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/ic/adv.c b/sys/dev/ic/adv.c
index d0ff03022ef..bed5c8eee15 100644
--- a/sys/dev/ic/adv.c
+++ b/sys/dev/ic/adv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adv.c,v 1.3 1998/11/17 04:25:21 downsj Exp $ */
+/* $OpenBSD: adv.c,v 1.4 1998/11/17 06:08:15 downsj Exp $ */
/* $NetBSD: adv.c,v 1.6 1998/10/28 20:39:45 dante Exp $ */
/*
@@ -721,10 +721,8 @@ adv_scsi_cmd(xs)
ccb->scsiq.q1.target_lun = sc_link->lun;
ccb->scsiq.q2.target_ix = ASC_TIDLUN_TO_IX(sc_link->target,
sc_link->lun);
-#define offsetof(type, member) ((size_t)(&((type *)0)->member))
ccb->scsiq.q1.sense_addr = sc->sc_dmamap_control->dm_segs[0].ds_addr +
ADV_CCB_OFF(ccb) + offsetof(struct adv_ccb, scsi_sense);
-#undef offsetof
ccb->scsiq.q1.sense_len = sizeof(struct scsi_sense_data);
/*
diff --git a/sys/dev/ic/advlib.h b/sys/dev/ic/advlib.h
index 3e8942cfbf1..fc6e1a9409d 100644
--- a/sys/dev/ic/advlib.h
+++ b/sys/dev/ic/advlib.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: advlib.h,v 1.3 1998/11/17 04:25:21 downsj Exp $ */
+/* $OpenBSD: advlib.h,v 1.4 1998/11/17 06:08:15 downsj Exp $ */
/* $NetBSD: advlib.h,v 1.5 1998/10/28 20:39:46 dante Exp $ */
/*
@@ -1336,4 +1336,7 @@ int AscResetDevice __P((ASC_SOFTC *, u_char));
/******************************************************************************/
+
+#define offsetof(type, member) ((size_t)(&((type *)0)->member))
+
#endif /* _ADVANSYS_NARROW_LIBRARY_H_ */