summaryrefslogtreecommitdiff
path: root/libc/misc/file
diff options
context:
space:
mode:
Diffstat (limited to 'libc/misc/file')
-rw-r--r--libc/misc/file/lockf.c4
-rw-r--r--libc/misc/file/lockf64.c5
2 files changed, 5 insertions, 4 deletions
diff --git a/libc/misc/file/lockf.c b/libc/misc/file/lockf.c
index dd5b90b3e..63d6a39c9 100644
--- a/libc/misc/file/lockf.c
+++ b/libc/misc/file/lockf.c
@@ -41,7 +41,7 @@ int attribute_hidden __lockf (int fd, int cmd, off_t len)
/* Test the lock: return 0 if FD is unlocked or locked by this process;
return -1, set errno to EACCES, if another process holds the lock. */
fl.l_type = F_RDLCK;
- if (fcntl (fd, F_GETLK, &fl) < 0)
+ if (__fcntl (fd, F_GETLK, &fl) < 0)
return -1;
if (fl.l_type == F_UNLCK || fl.l_pid == __getpid ())
return 0;
@@ -66,6 +66,6 @@ int attribute_hidden __lockf (int fd, int cmd, off_t len)
return -1;
}
- return fcntl(fd, cmd, &fl);
+ return __fcntl(fd, cmd, &fl);
}
strong_alias(__lockf,lockf)
diff --git a/libc/misc/file/lockf64.c b/libc/misc/file/lockf64.c
index 23f88f179..8440202d5 100644
--- a/libc/misc/file/lockf64.c
+++ b/libc/misc/file/lockf64.c
@@ -41,11 +41,12 @@
#include <sys/syscall.h>
#ifdef __NR_fcntl64
-extern int fcntl64 (int fd, int cmd, ...);
#define flock flock64
-#define fcntl fcntl64
+#define fcntl __fcntl64
#define F_GETLK F_GETLK64
#define F_SETLK F_SETLK64
+#else
+#define fcntl __fcntl
#endif
/* lockf is a simplified interface to fcntl's locking facilities. */