From ff421b6e0b3ef218799350358b9bff5610f17c3a Mon Sep 17 00:00:00 2001
From: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Tue, 24 Mar 2009 20:51:53 -0700
Subject: r300_cmdbuf.c: convert cast to a form supported by Sun cc

Fixes Sun cc error:
"r300_cmdbuf.c", line 142: invalid cast expression

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
---
 src/mesa/drivers/dri/r300/r300_cmdbuf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/mesa/drivers/dri')

diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
index 3eb2dc8f5a..f4472756f1 100644
--- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c
+++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
@@ -139,7 +139,7 @@ static void r300PrintStateAtom(r300ContextPtr r300, struct r300_state_atom *stat
 
 	if (RADEON_DEBUG & DEBUG_VERBOSE) {
 		for (i = 0; i < dwords;) {
-			cmd = (drm_r300_cmd_header_t) state->cmd[i];
+			cmd = *((drm_r300_cmd_header_t *) &state->cmd[i]);
 			reg = (cmd.packet0.reghi << 8) | cmd.packet0.reglo;
 			fprintf(stderr, "      %s[%d]: cmdpacket0 (first reg=0x%04x, count=%d)\n",
 					state->name, i, reg, cmd.packet0.count);
-- 
cgit v1.2.3