components/ocaml/patches/ocaml-solaris-build.patch
author Geoffrey Gardella <geoffrey.gardella@oracle.com>
Fri, 15 May 2015 14:07:20 -0700
changeset 4298 aa030c46708c
parent 1450 02791a89ea4f
permissions -rw-r--r--
21020797 Add "RO" to res1 field of auth_attr.d files in puppet


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;