The following commit has been merged in the master branch:
commit 6a5b68c94a1788a628d8b59a44e2977bbaa58908
Author: Stephane Glondu <st...@glondu.net>
Date:   Tue Nov 1 13:51:52 2011 +0100

    Add support for ENOTSUP (Closes: #646372)

diff --git a/debian/patches/0014-Add-support-for-ENOTSUP.patch 
b/debian/patches/0014-Add-support-for-ENOTSUP.patch
new file mode 100644
index 0000000..e2f031f
--- /dev/null
+++ b/debian/patches/0014-Add-support-for-ENOTSUP.patch
@@ -0,0 +1,49 @@
+From: Samuel Thibault <sthiba...@debian.org>
+Date: Tue, 1 Nov 2011 13:48:38 +0100
+Subject: Add support for ENOTSUP
+
+On some systems such as Solaris or GNU/Hurd, ENOTSUP and EOPNOSUPP do
+not have the same value, but ocaml code only deals with EOPNOSUPP, and
+thus ocaml applications only handle the EOPNOSUPP case. The attached
+patch fixes it by making ocaml convert ENOTSUP errors into EOPNOSUPP
+errors.
+
+This patch fixes omake build on hurd-i386.
+
+Bug: http://caml.inria.fr/mantis/view.php?id=5382
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=646372
+Signed-off-by: Stephane Glondu <st...@glondu.net>
+---
+ otherlibs/unix/unixsupport.c |   11 ++++++++++-
+ 1 files changed, 10 insertions(+), 1 deletions(-)
+
+diff --git a/otherlibs/unix/unixsupport.c b/otherlibs/unix/unixsupport.c
+index a471f9e..db5912e 100644
+--- a/otherlibs/unix/unixsupport.c
++++ b/otherlibs/unix/unixsupport.c
+@@ -165,7 +165,11 @@
+ #define ESOCKTNOSUPPORT (-1)
+ #endif
+ #ifndef EOPNOTSUPP
+-#define EOPNOTSUPP (-1)
++#  ifdef ENOTSUP
++#    define EOPNOTSUPP ENOTSUP
++#  else
++#    define EOPNOTSUPP (-1)
++#  endif
+ #endif
+ #ifndef EPFNOSUPPORT
+ #define EPFNOSUPPORT (-1)
+@@ -252,6 +256,11 @@ value unix_error_of_code (int errcode)
+   int errconstr;
+   value err;
+ 
++#if defined(ENOTSUP) && (EOPNOTSUPP != ENOTSUP)
++  if (errcode == ENOTSUP)
++    errcode = EOPNOTSUPP;
++#endif
++
+   errconstr =
+       cst_to_constr(errcode, error_table, sizeof(error_table)/sizeof(int), 
-1);
+   if (errconstr == Val_int(-1)) {
+-- 
diff --git a/debian/patches/series b/debian/patches/series
index 8b210e3..92b52ed 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@
 0011-Embed-bytecode-in-C-object-when-using-custom.patch
 0012-Make-objinfo-show-force_link-and-ccobjs-ccopts-when-.patch
 0013-ocamlopt-arm-add-.type-directive-for-code-symbols.patch
+0014-Add-support-for-ENOTSUP.patch

-- 
OCaml packaging

_______________________________________________
Pkg-ocaml-maint-commits mailing list
Pkg-ocaml-maint-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ocaml-maint-commits

Reply via email to