Hallo,
In the iOS SDK 4.0 the function stat64 exists but the struct stat64 does not (the stat64 function is marked as deprecated since stat always uses 64 bits). The attached patch looks for this struct, only enabling stat64 if both the function and the struct are found.
Cheers,