From 3ad6f8d831ed8d385521cacdfeae7e96423b87a6 Mon Sep 17 00:00:00 2001
From: atraczyk <andreastraczyk@gmail.com>
Date: Wed, 14 Dec 2016 18:43:45 -0500
Subject: [PATCH] build: provide ssize_t definition for native Windows builds

- defines ssize_t in ice_socket.h and utf8_utils.cpp for
  Microsofts compiler.

Change-Id: I46131f613a35cabae9df7749221ba2f30d7fd888
Tuleap: #790
---
 src/ice_socket.h   | 5 +++++
 src/utf8_utils.cpp | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/src/ice_socket.h b/src/ice_socket.h
index 57b83c73f6..2e474f2c12 100644
--- a/src/ice_socket.h
+++ b/src/ice_socket.h
@@ -23,6 +23,11 @@
 #include <memory>
 #include <functional>
 
+#if defined(_MSC_VER)
+#include <BaseTsd.h>
+using ssize_t = SSIZE_T;
+#endif
+
 namespace ring {
 
 class IceTransport;
diff --git a/src/utf8_utils.cpp b/src/utf8_utils.cpp
index b9bba48b91..6fe23ab2c5 100644
--- a/src/utf8_utils.cpp
+++ b/src/utf8_utils.cpp
@@ -25,6 +25,11 @@
 #include <cassert>
 #include "utf8_utils.h"
 
+#if defined(_MSC_VER)
+#include <BaseTsd.h>
+using ssize_t = SSIZE_T;
+#endif
+
 /*
  * The LIKELY and UNLIKELY macros let the programmer give hints to
  * the compiler about the expected result of an expression. Some compilers
-- 
GitLab