diff --git a/dlls/oleaut32/oleaut32.spec b/dlls/oleaut32/oleaut32.spec
index d536f3aaecfccedcd136308fe789d6286d69175d..3aa95a3eff02e077c97d978140e3902a1f6c77ee 100644
--- a/dlls/oleaut32/oleaut32.spec
+++ b/dlls/oleaut32/oleaut32.spec
@@ -155,7 +155,7 @@ type win32
 198 stub VarDecFromDisp
 199 stub VarDecFromBool
 200 stub GetErrorInfo
-201 stub SetErrorInfo
+201 stdcall SetErrorInfo(long ptr) SetErrorInfo
 202 stub CreateErrorInfo
 205 stdcall VarI2FromI1(long ptr) VarI2FromI1
 206 stdcall VarI2FromUI2(long ptr) VarI2FromUI2
diff --git a/misc/port.c b/misc/port.c
index d75d38b880190fbefa1e4fb380474c86b2f2c4d1..b1bc48b7fe8e396b71eeec7012f4a5c1c64a357f 100644
--- a/misc/port.c
+++ b/misc/port.c
@@ -4,7 +4,7 @@
  * Copyright 1996 Alexandre Julliard
  */
 
-#include "wine/port.h"
+#include "config.h"
 
 #ifdef __BEOS__
 #include <be/kernel/fs_info.h>
@@ -33,6 +33,8 @@
 # include <pty.h>
 #endif
 
+#include "wine/port.h"
+
 /***********************************************************************
  *		usleep
  */
diff --git a/tools/bin2res.c b/tools/bin2res.c
index 912ba8f7805b3145a4d08924df28d1f1ba3747eb..b121da01f2d7604eb41497fc509f3c325441cb82 100644
--- a/tools/bin2res.c
+++ b/tools/bin2res.c
@@ -23,7 +23,9 @@
 
 #include <fcntl.h>
 #include <unistd.h>
-#include <sys/mman.h>
+#ifdef HAVE_SYS_MMAN_H
+# include <sys/mman.h>
+#endif
 #include "winuser.h"
 
 extern char*   g_lpstrFileName;