summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2010-09-21 05:28:59 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2010-09-21 05:28:59 +0000
commit8ac6f4a4f3ffc4af51890409e7570a6b6884dbfa (patch)
tree7b59265b73d6ef664d8a5524d94d1b8bd9630ba5
parent57c6a6130c22095617cd39253673496c2a4ee3d7 (diff)
Stefan Rinkes pointed that the disabled aac(4) driver does not compile
with gcc4. Use his diff to make it compile. Submitted & tested by Stefan Rinkes. Thanks!
-rw-r--r--sys/dev/ic/aac.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/ic/aac.c b/sys/dev/ic/aac.c
index e79a7125f27..5bcff17e5fa 100644
--- a/sys/dev/ic/aac.c
+++ b/sys/dev/ic/aac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aac.c,v 1.49 2010/09/20 06:17:49 krw Exp $ */
+/* $OpenBSD: aac.c,v 1.50 2010/09/21 05:28:58 krw Exp $ */
/*-
* Copyright (c) 2000 Michael Smith
@@ -1048,7 +1048,7 @@ aac_bio_command(struct aac_softc *sc, struct aac_command **cmp)
br->Flags = 0;
fib->Header.Size += sizeof(struct aac_blockread64);
cm->cm_flags |= AAC_CMD_DATAOUT;
- (struct aac_sg_table64 *)cm->cm_sgtable = &br->SgMap64;
+ cm->cm_sgtable = (struct aac_sg_table *)&br->SgMap64;
} else {
struct aac_blockwrite64 *bw;
bw = (struct aac_blockwrite64 *)&fib->data[0];
@@ -1060,7 +1060,7 @@ aac_bio_command(struct aac_softc *sc, struct aac_command **cmp)
bw->Flags = 0;
fib->Header.Size += sizeof(struct aac_blockwrite64);
cm->cm_flags |= AAC_CMD_DATAIN;
- (struct aac_sg_table64 *)cm->cm_sgtable = &bw->SgMap64;
+ cm->cm_sgtable = (struct aac_sg_table *)&bw->SgMap64;
}
}
@@ -1547,7 +1547,8 @@ aac_init(struct aac_softc *sc)
sc->aac_common_busaddr = sc->aac_common_map->dm_segs[0].ds_addr;
if (sc->aac_common_busaddr < 8192) {
- (uint8_t *)sc->aac_common += 8192;
+ sc->aac_common = (struct aac_common *)
+ ((uint8_t *)sc->aac_common + 8192);
sc->aac_common_busaddr += 8192;
}