<div dir="ltr"><div>Hi.</div><div><br></div><div>LLVM/Clang uses `stat()` function to get file info (/Unix/Path.inc):</div><div><br></div><div> error_code status(const Twine &Path, file_status &Result) {</div><div>
SmallString<128> PathStorage;</div><div> StringRef P = Path.toNullTerminatedStringRef(PathStorage);</div><div> </div><div> struct stat Status;</div><div> int StatRet = ::stat(P.begin(), &Status); // failure here</div>
<div> return fillStatus(StatRet, Status, Result);</div><div> }</div><div><br></div><div>but it fails to run on iOS simulator with error:</div><div><br></div><div>> 2014-07-07 16:55:14.138 LibClangUsage7Demo[74938:60b] started Detected</div>
<div>> an attempt to call a symbol in system libraries that is not present on</div><div>> the iPhone: stat$INODE64 called from function</div><div>> _ZN4llvm3sys2fs6statusERKNS_5TwineERNS1_11file_statusE in image LibClangUsage7Demo.</div>
<div><br></div><div>For some reason `stat()` [is said to be missing][1] on iOS simulator though some people say they are able to use it in regular iOS apps.</div><div><br></div><div>How can i fix/workaround it?</div><div>
<br></div><div><br></div><div> [1]: <a href="http://stackoverflow.com/questions/24609034/stat-unavailable-in-ios-simulator">http://stackoverflow.com/questions/24609034/stat-unavailable-in-ios-simulator</a></div></div>