diff --git a/dlls/ntdll/exception.c b/dlls/ntdll/exception.c index 8974cedce95..c039dd4fe53 100644 --- a/dlls/ntdll/exception.c +++ b/dlls/ntdll/exception.c @@ -23,6 +23,7 @@ #include "wine/port.h" #include +#include #include #include @@ -147,6 +148,7 @@ extern DWORD EXC_CallHandler( EXCEPTION_RECORD *record, EXCEPTION_REGISTRATION_R void wait_suspend( CONTEXT *context ) { LARGE_INTEGER timeout; + int saved_errno = errno; /* store the context we got at suspend time */ SERVER_START_REQ( set_thread_context ) @@ -173,6 +175,8 @@ void wait_suspend( CONTEXT *context ) wine_server_call( req ); } SERVER_END_REQ; + + errno = saved_errno; }