--- ipmitool-1.8.7/lib/ipmi_pef.c.peftime 2006-05-16 11:39:00.000000000 +0200 +++ ipmitool-1.8.7/lib/ipmi_pef.c 2006-05-16 11:39:19.000000000 +0200 @@ -731,6 +731,7 @@ struct pef_cfgparm_selector psel; char tbuf[40]; time_t ts; + uint32_t timei; memset(&req, 0, sizeof(req)); req.msg.netfn = IPMI_NETFN_SE; @@ -741,11 +742,11 @@ "Last S/W processed ID"); return; } + memcpy(&timei, rsp->data, 4); #if WORDS_BIGENDIAN - ts = (time_t)(rsp->data[0]<<24 + rsp->data[1]<<16 + rsp->data[2]<<8 + rsp->data[3]); -#else - ts = (time_t)(*(long *)rsp->data); + timei = BSWAP_32(timei); #endif + ts = (time_t)timei; strftime(tbuf, sizeof(tbuf), "%m/%d/%Y %H:%M:%S", localtime(&ts)); ipmi_pef_print_str("Last SEL addition", tbuf); --- ipmitool-1.8.7/lib/ipmi_sel.c.peftime 2006-05-16 11:39:06.000000000 +0200 +++ ipmitool-1.8.7/lib/ipmi_sel.c 2006-05-16 11:39:20.000000000 +0200 @@ -1501,7 +1501,7 @@ memcpy(&timei, rsp->data, 4); #if WORDS_BIGENDIAN - timei = BSWAP_32(time); + timei = BSWAP_32(timei); #endif time = (time_t)timei;