--- dlls/ntdll/heap.c +++ dlls/ntdll/heap.c @@ -135,13 +135,8 @@ static BOOL HEAP_IsRealArena( HEAP *heap /* SetLastError for ntdll */ inline static void set_status( NTSTATUS status ) { -#if defined(__i386__) && defined(__GNUC__) - /* in this case SetLastError is an inline function so we can use it */ - SetLastError( RtlNtStatusToDosError( status ) ); -#else /* cannot use SetLastError, do it manually */ NtCurrentTeb()->last_error = RtlNtStatusToDosError( status ); -#endif } /* set the process main heap */ --- dlls/ntdll/server.c +++ dlls/ntdll/server.c @@ -55,6 +55,7 @@ #include "wine/library.h" #include "wine/server.h" #include "winerror.h" +#include "ntdll_misc.h" /* Some versions of glibc don't define this */ #ifndef SCM_RIGHTS --- dlls/ntdll/virtual.c +++ dlls/ntdll/virtual.c @@ -47,6 +47,7 @@ #include "wine/library.h" #include "wine/server.h" #include "wine/debug.h" +#include "ntdll_misc.h" WINE_DEFAULT_DEBUG_CHANNEL(virtual); WINE_DECLARE_DEBUG_CHANNEL(module);