1 --- creat.c.orig 2009-11-06 10:36:38.000000000 -0800
2 +++ creat.c 2009-11-06 10:39:44.000000000 -0800
3 @@ -33,14 +33,26 @@ static char sccsid[] = "@(#)creat.c 8.1
5 __FBSDID("$FreeBSD: src/lib/libc/compat-43/creat.c,v 1.8 2007/01/09 00:27:49 imp Exp $");
10 #include "un-namespace.h"
12 +#ifdef VARIANT_CANCELABLE
13 +int __open(const char *path, int flags, mode_t mode);
14 +#else /* !VARIANT_CANCELABLE */
15 +int __open_nocancel(const char *path, int flags, mode_t mode);
16 +#endif /* VARIANT_CANCELABLE */
20 __creat(const char *path, mode_t mode)
22 - return(_open(path, O_WRONLY|O_CREAT|O_TRUNC, mode));
23 +#ifdef VARIANT_CANCELABLE
24 + return(__open(path, O_WRONLY|O_CREAT|O_TRUNC, mode));
25 +#else /* !VARIANT_CANCELABLE */
26 + return(__open_nocancel(path, O_WRONLY|O_CREAT|O_TRUNC, mode));
27 +#endif /* VARIANT_CANCELABLE */
29 __weak_reference(__creat, creat);
30 __weak_reference(__creat, _creat);