From fdda78524808e05c8d50139e3b37544d7b1aa408 Mon Sep 17 00:00:00 2001
From: Paul Bakker
Date: Sat, 30 Nov 2013 15:15:31 +0100
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 02de364ba..3d2c02cb3 100644
--- a/programs/ssl/ssl_fork_server.c
+++ b/programs/ssl/ssl_fork_server.c
@@ -32,9 +32,12 @@
#include
#include
#include
-#include
#include
+#if !defined(_MSC_VER) || defined(EFIX64) || defined(EFI32)
+#include
+#endif
+
#include "polarssl/entropy.h"
#include "polarssl/ctr_drbg.h"
#include "polarssl/certs.h"
diff --git a/programs/ssl/ssl_mail_client.c b/programs/ssl/ssl_mail_client.c
index 70ba6221e..a3e9f2b98 100644
--- a/programs/ssl/ssl_mail_client.c
+++ b/programs/ssl/ssl_mail_client.c
@@ -28,7 +28,14 @@
#include
#include
#include
+
+#if !defined(_MSC_VER) || defined(EFIX64) || defined(EFI32)
#include
+#else
+#include
+#define read _read
+#define write _write
+#endif
#if defined(_WIN32) || defined(_WIN32_WCE)