summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--otherlibs/unix/access.c23
-rw-r--r--otherlibs/unix/socketaddr.c4
2 files changed, 19 insertions, 8 deletions
diff --git a/otherlibs/unix/access.c b/otherlibs/unix/access.c
index 4041a1780..605adda2f 100644
--- a/otherlibs/unix/access.c
+++ b/otherlibs/unix/access.c
@@ -16,15 +16,22 @@
#include "unixsupport.h"
#ifdef HAS_UNISTD
-#include <unistd.h>
+# include <unistd.h>
#else
-#include <sys/file.h>
-#ifndef R_OK
-#define R_OK 4/* test for read permission */
-#define W_OK 2/* test for write permission */
-#define X_OK 1/* test for execute (search) permission */
-#define F_OK 0/* test for presence of file */
-#endif
+# ifndef _WIN32
+# include <sys/file.h>
+# ifndef R_OK
+# define R_OK 4/* test for read permission */
+# define W_OK 2/* test for write permission */
+# define X_OK 1/* test for execute (search) permission */
+# define F_OK 0/* test for presence of file */
+# endif
+# else
+# define R_OK 4/* test for read permission */
+# define W_OK 2/* test for write permission */
+# define X_OK 4/* test for execute (search) permission */
+# define F_OK 0/* test for presence of file */
+# endif
#endif
static int access_permission_table[] = {
diff --git a/otherlibs/unix/socketaddr.c b/otherlibs/unix/socketaddr.c
index 6660390e8..c62538b21 100644
--- a/otherlibs/unix/socketaddr.c
+++ b/otherlibs/unix/socketaddr.c
@@ -22,6 +22,10 @@
#include "socketaddr.h"
+#ifdef _WIN32
+#define EAFNOSUPPORT WSAEAFNOSUPPORT
+#endif
+
value alloc_inet_addr(a)
unsigned int a;
{