gcc compiling error

I am using gcc to compile c objects on solaris 5.10 and hit the following error messages:
/usr/include/sys/vfs.h:323: error: syntax error before "statvfs64_t"
/usr/include/sys/vfs.h:334: error: syntax error before "statvfs64_t"
gmake: *** [eMEDload.o] Error 1

The c program files were copied over from solaris 5.8 environment and they were running without errors. So could this problem caused by the different version of solaris?

Thanks.

More likely a completely different compiler.

What does

which cc

show on both systems (8 & 10)?

And the output from

gcc -###

Thank you for your reply.

The version of gcc on solaris 5.8 is 3.4.2; and the version on solaris 5.10 is 3.4.3. Shouldn't they recognize the same system variables? Why the newer system with newer gcc complain about the system syntax errors?

Thanks.