1 --- lockf.c.orig 2006-09-16 19:12:39.000000000 -0700
2 +++ lockf.c 2006-09-16 20:35:36.000000000 -0700
5 __FBSDID("$FreeBSD: src/lib/libc/gen/lockf.c,v 1.8 2002/02/01 00:57:29 obrien Exp $");
7 +#ifdef VARIANT_CANCELABLE
8 +int __fcntl(int, int, void *);
9 +#else /* !VARIANT_CANCELABLE */
10 +int __fcntl_nocancel(int, int, void *);
11 +#endif /* VARIANT_CANCELABLE */
14 #include "namespace.h"
24 fl.l_whence = SEEK_CUR;
29 - if (_fcntl(filedes, F_GETLK, &fl) == -1)
30 +#ifdef VARIANT_CANCELABLE
31 + if (__fcntl(filedes, F_GETLK, &fl) == -1)
33 +#else /* !VARIANT_CANCELABLE */
34 + if (__fcntl_nocancel(filedes, F_GETLK, &fl) == -1)
36 +#endif /* VARIANT_CANCELABLE */
37 if (fl.l_type == F_UNLCK || fl.l_pid == getpid())
44 - return (_fcntl(filedes, cmd, &fl));
45 +#ifdef VARIANT_CANCELABLE
46 + return (__fcntl(filedes, cmd, &fl));
47 +#else /* !VARIANT_CANCELABLE */
48 + return (__fcntl_nocancel(filedes, cmd, &fl));
49 +#endif /* VARIANT_CANCELABLE */