diff --git a/ocaml-ocamlnet.spec b/ocaml-ocamlnet.spec index 661ea92..015c314 100644 --- a/ocaml-ocamlnet.spec +++ b/ocaml-ocamlnet.spec @@ -11,7 +11,7 @@ Name: ocaml-ocamlnet Version: 3.7.4 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Network protocols for OCaml License: BSD @@ -21,6 +21,9 @@ Source0: http://download.camlcity.org/download/ocamlnet-%{version}.tar.gz # Fix for broken configure tests. Patch1: ocamlnet-3.7.4-fix-configure.patch +# Fix for int(32|64) -> int(32|64)_t in latest OCaml upstream. +Patch2: ocamlnet-3.7.4-fix-int-types.patch + ExcludeArch: sparc64 s390 s390x BuildRequires: ocaml >= 3.12.1-3 @@ -113,6 +116,7 @@ files for developing applications that use %{name}-nethttpd. %setup -q -n ocamlnet-%{version} %patch1 -p1 +%patch2 -p1 %build @@ -222,8 +226,9 @@ echo -e '-b /usr/bin/netplex-admin\n-b /usr/bin/ocamlrpcgen' \ %changelog -* Sat Aug 30 2014 Richard W.M. Jones - 3.7.4-8 +* Sat Aug 30 2014 Richard W.M. Jones - 3.7.4-9 - ocaml-4.02.0 final rebuild. +- Fix for int(32|64) -> int(32|64)_t in latest OCaml upstream. * Sun Aug 23 2014 Richard W.M. Jones - 3.7.4-7 - Fix for broken configure tests. diff --git a/ocamlnet-3.7.4-fix-int-types.patch b/ocamlnet-3.7.4-fix-int-types.patch new file mode 100644 index 0000000..3abba4b --- /dev/null +++ b/ocamlnet-3.7.4-fix-int-types.patch @@ -0,0 +1,100 @@ +diff -ur ocamlnet-3.7.4.old/src/netsys/netsys_c_event.c ocamlnet-3.7.4/src/netsys/netsys_c_event.c +--- ocamlnet-3.7.4.old/src/netsys/netsys_c_event.c 2014-05-12 20:00:39.000000000 +0100 ++++ ocamlnet-3.7.4/src/netsys/netsys_c_event.c 2014-08-30 18:12:48.443050478 +0100 +@@ -142,7 +142,7 @@ + + case NE_EVENTFD: + { +- int64 buf; ++ int64_t buf; + buf = 1; + if (ne->fd1 >= 0) { + int code; +@@ -391,7 +391,7 @@ + { + #ifdef HAVE_POLL + struct not_event *ne; +- int64 n; ++ int64_t n; + char buf[1]; + int code, ok, e; + CAMLparam1(nev); +diff -ur ocamlnet-3.7.4.old/src/netsys/netsys_c_fadvise.c ocamlnet-3.7.4/src/netsys/netsys_c_fadvise.c +--- ocamlnet-3.7.4.old/src/netsys/netsys_c_fadvise.c 2014-05-12 20:00:39.000000000 +0100 ++++ ocamlnet-3.7.4/src/netsys/netsys_c_fadvise.c 2014-08-30 18:12:48.446050487 +0100 +@@ -23,7 +23,7 @@ + CAMLprim value netsys_fadvise(value fd, value start, value len, value adv) { + #ifdef HAVE_POSIX_FADVISE + int adv_int, r; +- int64 start_int, len_int; ++ int64_t start_int, len_int; + off_t start_off, len_off; + /* Att: off_t might be 64 bit even on 32 bit systems! */ + +@@ -41,9 +41,9 @@ + start_int = Int64_val(start); + len_int = Int64_val(len); + +- if ( ((int64) ((off_t) start_int)) != start_int ) ++ if ( ((int64_t) ((off_t) start_int)) != start_int ) + failwith("Netsys.fadvise: large files not supported on this OS"); +- if ( ((int64) ((off_t) len_int)) != len_int ) ++ if ( ((int64_t) ((off_t) len_int)) != len_int ) + failwith("Netsys.fadvise: large files not supported on this OS"); + + start_off = start_int; +diff -ur ocamlnet-3.7.4.old/src/netsys/netsys_c_fallocate.c ocamlnet-3.7.4/src/netsys/netsys_c_fallocate.c +--- ocamlnet-3.7.4.old/src/netsys/netsys_c_fallocate.c 2014-05-12 20:00:39.000000000 +0100 ++++ ocamlnet-3.7.4/src/netsys/netsys_c_fallocate.c 2014-08-30 18:12:48.442050481 +0100 +@@ -20,16 +20,16 @@ + CAMLprim value netsys_fallocate(value fd, value start, value len) { + #ifdef HAVE_POSIX_FALLOCATE + int r; +- int64 start_int, len_int; ++ int64_t start_int, len_int; + off_t start_off, len_off; + /* Att: off_t might be 64 bit even on 32 bit systems! */ + + start_int = Int64_val(start); + len_int = Int64_val(len); + +- if ( ((int64) ((off_t) start_int)) != start_int ) ++ if ( ((int64_t) ((off_t) start_int)) != start_int ) + failwith("Netsys.fadvise: large files not supported on this OS"); +- if ( ((int64) ((off_t) len_int)) != len_int ) ++ if ( ((int64_t) ((off_t) len_int)) != len_int ) + failwith("Netsys.fadvise: large files not supported on this OS"); + + start_off = start_int; +diff -ur ocamlnet-3.7.4.old/src/netsys/netsys_c_mem.c ocamlnet-3.7.4/src/netsys/netsys_c_mem.c +--- ocamlnet-3.7.4.old/src/netsys/netsys_c_mem.c 2014-05-12 20:00:39.000000000 +0100 ++++ ocamlnet-3.7.4/src/netsys/netsys_c_mem.c 2014-08-30 18:12:48.445050479 +0100 +@@ -182,7 +182,7 @@ + void *addr, *eff_addr; + intnat size; + uintnat basize; +- int64 pos0; ++ int64_t pos0; + uintnat pagesize, delta; + + /* Avoid here seeking at all costs. On some systems, shared memory +@@ -190,7 +190,7 @@ + */ + fd = Int_val(fdv); + pos0 = Int64_val(posv); +- if (((int64) ((off_t) pos0)) != pos0) ++ if (((int64_t) ((off_t) pos0)) != pos0) + failwith("Netsys_mem: large files not supported on this OS"); + pos = pos0; + addr = (void *) Nativeint_val(addrv); +@@ -913,8 +913,8 @@ + caml_id = 'b'; + break; + } +- case 'i': /* int32 */ +- case 'j': /* int64 */ ++ case 'i': /* int32_t */ ++ case 'j': /* int64_t */ + case 'n': /* nativeint */ + if (!enable_customs) { + #ifdef DEBUG