summarylogtreecommitdiffstats
path: root/0001-Replace-use-of-uint32-by-standard-complient-way.patch
blob: de7d639785c97188eb6e4f882139c8d53e0830f7 (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
30
31
32
33
34
35
36
37
38
39
From 2c3dfc748e84fbfd99cf64bdedfa150a1b30286f Mon Sep 17 00:00:00 2001
From: tychota <tychota@users.noreply.github.com>
Date: Sun, 17 Jul 2016 10:52:08 +0200
Subject: [PATCH] Replace use of uint32 by standard/ complient way

This closes #142.

Uint32 semms to be platform specific :
- http://stackoverflow.com/questions/13362084/difference-between-uint32-and-uint32-t

This I'm importing stdint and using the standard uint32_t type.
---
 external/ocamlzip/zlibstubs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/external/ocamlzip/zlibstubs.c b/external/ocamlzip/zlibstubs.c
index a627df9..62e5ed7 100644
--- a/external/ocamlzip/zlibstubs.c
+++ b/external/ocamlzip/zlibstubs.c
@@ -16,6 +16,7 @@
 /* Stub code to interface with Zlib */
 
 #include <zlib.h>
+#include <stdint.h>
 
 #include <caml/mlvalues.h>
 #include <caml/alloc.h>
@@ -168,7 +169,7 @@ value camlzip_inflateEnd(value vzs)
 
 value camlzip_update_crc32(value crc, value buf, value pos, value len)
 {
-  return caml_copy_int32(crc32((uint32) Int32_val(crc), 
+  return caml_copy_int32(crc32((uint32_t) Int32_val(crc), 
                           &Byte_u(buf, Long_val(pos)),
                           Long_val(len)));
 }
-- 
2.9.2