components/ocaml/patches/ocaml-solaris-build.patch
author April Chin <april.chin@oracle.com>
Wed, 27 Jan 2016 17:18:04 -0800
changeset 5355 5ccf97c2878d
parent 1450 02791a89ea4f
permissions -rw-r--r--
22611345 building ruby components should not force options which are optional


Patch from Desktop team that fixes a NFS issue.
http://caml.inria.fr/mantis/view.php?id=4663

diff -urN ocaml-3.11.2/byterun/io.c ocaml-3.11.2.new/byterun/io.c
--- ocaml-3.11.2/byterun/io.c	2011-04-07 13:41:41.040436216 +0800
+++ ocaml-3.11.2.new/byterun/io.c	2011-04-07 13:42:50.119747390 +0800
@@ -479,6 +479,9 @@
   struct channel * channel = Channel(vchannel);
   if (channel->fd != -1){
     result = close(channel->fd);
+    /* Work around an NFS issue that causes close() to fails with EINVAL */
+    if ((result < 0) && (errno == EINVAL))
+      result = 0;
     channel->fd = -1;
   }else{
     result = 0;