]> git.saurik.com Git - apple/libc.git/blame - gen/FreeBSD/exec.c.patch
Libc-594.9.4.tar.gz
[apple/libc.git] / gen / FreeBSD / exec.c.patch
CommitLineData
3d9156a7
A
1--- exec.c.orig 2004-11-24 00:12:00.000000000 -0800
2+++ exec.c 2004-11-24 15:46:54.000000000 -0800
9385eb3d
A
3@@ -51,7 +51,8 @@
4 #include <stdarg.h>
5 #include "un-namespace.h"
6
7-extern char **environ;
8+#include <crt_externs.h>
9+#define environ (*_NSGetEnviron())
10
11 int
12 execl(const char *name, const char *arg, ...)
3d9156a7
A
13@@ -268,8 +269,9 @@
14 }
15 if (eacces)
16 errno = EACCES;
17- else
18+ else if (cur)
19 errno = ENOENT;
20+ /* else use existing errno from _execve */
21 done:
22 return (-1);
23 }