]> git.saurik.com Git - apple/libc.git/blob - gen/FreeBSD/wait.c.patch
Libc-763.13.tar.gz
[apple/libc.git] / gen / FreeBSD / wait.c.patch
1 --- wait.c.orig 2009-11-07 14:51:38.000000000 -0800
2 +++ wait.c 2009-11-07 14:51:40.000000000 -0800
3 @@ -40,10 +40,20 @@ __FBSDID("$FreeBSD: src/lib/libc/gen/wai
4 #include <sys/resource.h>
5 #include "un-namespace.h"
6
7 +#ifdef VARIANT_CANCELABLE
8 +int __wait4(pid_t, int *, int , struct rusage *);
9 +#else /* !VARIANT_CANCELABLE */
10 +int __wait4_nocancel(pid_t, int *, int , struct rusage *);
11 +#endif /* VARIANT_CANCELABLE */
12 +
13 pid_t
14 __wait(int *istat)
15 {
16 - return (_wait4(WAIT_ANY, istat, 0, (struct rusage *)0));
17 +#ifdef VARIANT_CANCELABLE
18 + return (__wait4(WAIT_ANY, istat, 0, (struct rusage *)0));
19 +#else /* !VARIANT_CANCELABLE */
20 + return (__wait4_nocancel(WAIT_ANY, istat, 0, (struct rusage *)0));
21 +#endif /* VARIANT_CANCELABLE */
22 }
23
24 __weak_reference(__wait, wait);