This is discussed on the TinyOS Help list:
I'm running Ubuntu with kernel 2.6.12-10-386 and gcc
3.3, 3.4, and 4.0.2. I changed c-parse.gperf as
indicated and $TOSROOT/tools/java/net/tinyos/sim
finally built correctly for me. I tested TOSSIM with
simple apps (Blink, CntToLedAndRfm, etc) and it seems
to work fine.
I've attached a patch for 1.2.4. I know you aren't
going to want to include the patch because it will
break on Windows, apparently non 2.6.9 kernels of
Linux, and others.
But I wasn't sure how you would want to setup the
conditional in c-parse.gperf. Or even if you'd want to
fix it at all as opposed to mentioning a patch. If you
do want to do it I'd be willing to do the work if you
want to tell me what method you want used.
I'd just like to get the patch more visable. Google is
great but making the answers easy to find is great too. :)