--- source/include/byteorder.h.orig 2003-07-31 13:36:52.000000000 +1000 +++ source/include/byteorder.h 2003-07-31 13:38:14.000000000 +1000 @@ -105,7 +105,7 @@ #define CAREFUL_ALIGNMENT 1 #endif -#define CVAL(buf,pos) (((const unsigned char *)(buf))[pos]) +#define CVAL(buf,pos) ((unsigned)(((const unsigned char *)(buf))[pos])) #define CVAL_NC(buf,pos) (((unsigned char *)(buf))[pos]) /* Non-const version of CVAL */ #define PVAL(buf,pos) (CVAL(buf,pos)) #define SCVAL(buf,pos,val) (CVAL_NC(buf,pos) = (val))