Portability fixes.

diff --git a/tools/bin2res.c b/tools/bin2res.c
index d14c627..e018bc5 100644
--- a/tools/bin2res.c
+++ b/tools/bin2res.c
@@ -36,7 +36,9 @@
 #include <stdlib.h>
 
 #include <fcntl.h>
-#include <unistd.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
 #ifdef HAVE_SYS_MMAN_H
 # include <sys/mman.h>
 #endif
diff --git a/tools/widl/utils.c b/tools/widl/utils.c
index 379a36d..ff2fba9 100644
--- a/tools/widl/utils.c
+++ b/tools/widl/utils.c
@@ -20,6 +20,7 @@
  */
 
 #include "config.h"
+#include "wine/port.h"
 
 #include <assert.h>
 #include <stdio.h>
diff --git a/tools/winedump/ne.c b/tools/winedump/ne.c
index 147fa29..f286b92 100644
--- a/tools/winedump/ne.c
+++ b/tools/winedump/ne.c
@@ -18,9 +18,14 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include "config.h"
+#include "wine/port.h"
+
 #include <fcntl.h>
 #include <stdio.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 
 #include "windef.h"
 #include "winbase.h"