Mac OS X Patch

Brent Fulgham bfulg@REDACTED
Wed Feb 2 05:38:50 CET 2005


Back in September of 2003, Sean Hinde identified a problem with Erlang 
under Mac OS X.  Could this patch be incorporated upstream so we don't 
have to keep manually patching the sources?

Thanks,

-Brent

========================================

From:  Sean Hinde <sean.hinde@REDACTED>
Subject:  OS X patch for run_erl.c
Date:  Sat, 13 Sep 2003 18:35:17 +0100

Hi,

The following patch to run_erl.c is required for Erlang to run in
embedded mode under OS X. Without this patch run_erl fails to create
the pipe in /tmp

Hopefully this will make it into R9C-1, but in the meantime here it is
in case anyone else has encountered the problem and needs a fix now.

Regs,
Sean

[HugeMac:~/Desktop] sean% diff -u
otp_src_R9C-0.orig/erts/etc/unix/run_erl.c
otp_src_R9C-0/erts/etc/unix/run_erl.c
--- otp_src_R9C-0.orig/erts/etc/unix/run_erl.c  Mon Jul  7 13:01:10 2003
+++ otp_src_R9C-0/erts/etc/unix/run_erl.c       Sat Sep 13 18:26:53 2003
  <at>  <at>  -738,7 +738,11  <at>  <at>
    */
   static int create_fifo(char *name, int perm)
   {
-  if ((mknod(name, S_IFIFO | perm, 0) < 0) && (errno != EEXIST))
+#ifdef HAVE_MACH_O_DYLD_H
+  if ((mkfifo(name, perm) < 0) && (errno != EEXIST))
+#else
+    if ((mknod(name, S_IFIFO | perm, 0) < 0) && (errno != EEXIST))
+#endif
       return -1;
     return 0;
   }

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1418 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20050201/a7a7b6bb/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20050201/a7a7b6bb/attachment-0001.bin>


More information about the erlang-patches mailing list