From 8ac6f4a4f3ffc4af51890409e7570a6b6884dbfa Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Tue, 21 Sep 2010 05:28:59 +0000 Subject: 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! --- sys/dev/ic/aac.c | 9 +++++---- 1 file 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; } -- cgit v1.2.3