[OpenAFS-devel] -current, offsetof and irix

chas williams chas@cmf.nrl.navy.mil
Thu, 24 Jan 2002 15:02:05 -0500


it seems the irix compiler doesnt like the way that offsetof was used in
src/rx/rx.h:

/usr/bin/cc -I. -I. -O -I/scratch/chas/openafs/src/config -I/scratch/chas/openafs/include -DRXDEBUG -n32 -mips3 -woff 1009,1110,1116,1164,1171,1177,1183,1185,1204,1233,1515,1516,1548,1169,1174,1177,1196,1498,1506,1552   -c -o rx.o rx.c
cc-1028 cc: ERROR File = rx.c, Line = 3611
  The expression used must have a constant value.

      if ( np->length >= rx_AckDataSize(ap->nAcks) + 2*sizeof(afs_int32)) {

i believe it doesnt like the new definition of rx_AckDataSize:

#define rx_AckDataSize(nAcks) (3 + offsetof(struct rx_ackPacket, acks[nAcks]))