X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/30984deafc05d7c6f88db736336fe73d23a08e19..842215bbb7b87bd3800f95f3d633da0690e18b76:/src/common/filefn.cpp diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 1ed5377151..c33c44c174 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -298,7 +298,11 @@ wxFileExists (const wxString& filename) return (ret != (DWORD)-1) && !(ret & FILE_ATTRIBUTE_DIRECTORY); #else // !__WIN32__ wxStructStat st; - return wxStat(filename, &st) == 0 && (st.st_mode & S_IFREG); +#ifndef wxNEED_WX_UNISTD_H + return wxStat( filename.fn_str() , &st) == 0 && (st.st_mode & S_IFREG); +#else + return wxStat( filename , &st) == 0 && (st.st_mode & S_IFREG); +#endif #endif // __WIN32__/!__WIN32__ }