--- ipmitool-1.8.9/lib/ipmi_sel.c	2008-07-19 01:32:49.000000000 +0100
+++ ipmitool-1.8.9-parsehexa/lib/ipmi_sel.c	2008-07-20 01:27:29.000000000 +0100
@@ -31,6 +31,7 @@
  */
 
 #include <string.h>
+#include <stdlib.h> /* for strtoul, to parse hexadecimal values  */
 #include <math.h>
 #define __USE_XOPEN /* glibc2 needs this for strptime */
 #include <time.h>
@@ -1776,7 +1777,7 @@
 
 	for (; argc != 0; argc--)
 	{
-		id = atoi(argv[argc-1]);
+		id = (uint16_t) strtoul(argv[argc-1], NULL, 0);
 		msg_data[2] = id & 0xff;
 		msg_data[3] = id >> 8;
 
