Skip to content

Commit d49cffe

Browse files
committed
Buildfix
1 parent aafdd67 commit d49cffe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Common/FileUtil.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ bool Exists(const std::string &filename)
135135
{
136136
// Make sure Windows will no longer handle critical errors, which means no annoying "No disk" dialog
137137
// Save the old error mode
138+
#ifdef _WIN32
138139
int OldMode = SetErrorMode(SEM_FAILCRITICALERRORS);
140+
#endif
139141

140142
struct stat64 file_info;
141143
#if defined(_WIN32) && defined(UNICODE)
@@ -151,7 +153,9 @@ bool Exists(const std::string &filename)
151153
#endif
152154

153155
// Set the old error mode
156+
#ifdef _WIN32
154157
SetErrorMode(OldMode);
158+
#endif
155159

156160
return (result == 0);
157161
}

0 commit comments

Comments
 (0)