aboutsummaryrefslogtreecommitdiff
path: root/ports/iniparser/win32_ssize_t.patch
blob: 3fefee6c8cb8ef4ae7cbc5ccdcd013111300c8b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
diff --git a/src/dictionary.c b/src/dictionary.c
index cb7ccd4..7985ab3 100644
--- a/src/dictionary.c
+++ b/src/dictionary.c
@@ -18,7 +18,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <unistd.h>
 
 /** Maximum value size for integers and doubles. */
 #define MAXVALSZ    1024
diff --git a/src/dictionary.h b/src/dictionary.h
index d04b6ce..929ae17 100644
--- a/src/dictionary.h
+++ b/src/dictionary.h
@@ -21,7 +21,12 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#ifdef _MSC_VER
+#include <BaseTsd.h>
+typedef SSIZE_T ssize_t;
+#else
 #include <unistd.h>
+#endif
 
 #ifdef __cplusplus
 extern "C" {