shared object "undefined symbol: fstat" error

Didn't have this problem in AIX, but ported to Linux with GCC compiler and am now getting a runtime error:
tssutil: symbol lookup error: /work/agility/devel/bin/libagam.so: undefined symbol: fstat
I'm sure most of you know that fstat is an intrinsic function just like printf, memcpy, etc. When I do an "objdump -T" of the shared object, all the other intrinsic functions show "GLIBC_2.2.5" in the Dynamic Symbol Table, but fstat does not. Anyone know how to get past this problem? (I wanted to use fstat to get file size, so have a HORRIBLE workaround of seeking to SEEK_END to get the file size. I'd really rather do this right.) There must be a way to explicitly tell the linker or dynamic loader where to find the fstat object.
HELP! Any help would be appreciated. Muchas gracias.
~Marcus

Sometimes symbol lookup is deferred for various reasons.. I'm assuming you're compiling libagam.so

What version of gcc? The very latest version, 4.0.2, has problems.

gcc version 3.4.5 20051201 (Red Hat 3.4.5-2)

Unless you've complex a complex list of objects and have something out of order -
I give up.

Read the linux fstat manpage. Note the required includes. Add in the required includes that you're missing. Try it again.

That's just preprocessing directives anyway. Good for prototyping and for the stat structure definition, etc., and could cause problems on compile if wrong headers were not included, but it does not affect linkage. Thanks for trying though. ~Marcus