From 238be3a2079583538a115c17a600683301e269f5 Mon Sep 17 00:00:00 2001
From: Paul Bakker
Date: Mon, 7 Jul 2014 14:55:07 +0200
Subject: [PATCH] Removed dependency on unistd.h for MSVC in apps
---
programs/ssl/ssl_fork_server.c | 5 ++++-
programs/ssl/ssl_mail_client.c | 7 +++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/programs/ssl/ssl_fork_server.c b/programs/ssl/ssl_fork_server.c
index 9e3045113..76c782b7b 100644
--- a/programs/ssl/ssl_fork_server.c
+++ b/programs/ssl/ssl_fork_server.c
@@ -34,9 +34,12 @@
#include
#include
#include
-#include
#include
+#if !defined(_MSC_VER)
+#include
+#endif
+
#include "polarssl/config.h"
#include "polarssl/entropy.h"
diff --git a/programs/ssl/ssl_mail_client.c b/programs/ssl/ssl_mail_client.c
index 86b354811..fb2f822d2 100644
--- a/programs/ssl/ssl_mail_client.c
+++ b/programs/ssl/ssl_mail_client.c
@@ -30,7 +30,14 @@
#include
#include
#include
+
+#if !defined(_MSC_VER)
#include
+#else
+#include
+#define read _read
+#define write _write
+#endif
#if defined(_WIN32) || defined(_WIN32_WCE)