stat() unavailable in ios simulator?

I’ve compiled and linked ios app that uses lib (libclang) that uses stat() with no errors. But i’m having runtime error:

2014-07-07 16:55:14.138 LibClangUsage7Demo[74938:60b] started Detected
an attempt to call a symbol in system libraries that is not present on
the iPhone: stat$INODE64 called from function
_ZN4llvm3sys2fs6statusERKNS_5TwineERNS1_11file_statusE in image LibClangUsage7Demo.

  • Swipe between two UIViewControllers' views
  • How to access camera flash on UIImagePickerController?
  • UIButton title changes to default
  • iOS crash log catch, debug info.. Catch and send via email to the Dev team
  • Android like permissions in iOS
  • Apple Certificate for iOS Developer and Mac Developer is expired “The certificate has an invalid issuer”
  • LLVM code which raises error is (/Unix/Path.inc):

    error_code status(const Twine &Path, file_status &Result) {
      SmallString<128> PathStorage;
      StringRef P = Path.toNullTerminatedStringRef(PathStorage);
    
      struct stat Status;
      int StatRet = ::stat(P.begin(), &Status); // failure here
      return fillStatus(StatRet, Status, Result);
    }
    

    How was i able to link the app without having stat() in symbols? How can i fix/walk-around it?

    PS. I can see stat is supported by iOS (Simulator?):
    https://developer.apple.com/library/prerelease/ios/documentation/System/Conceptual/ManPages_iPhoneOS/man2/stat.2.html

    2 Solutions Collect From Internet About “stat() unavailable in ios simulator?”

    I was said stat is not supported on iOS.

    The issue is that you built libclang for OSX and linked it into an iOS executable. You need to build libclang for the correct platform.

    stat certainly is supported on iOS.