OSDN Git Service
(root)
/
android-x86
/
external-musl-libc.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
overhaul pthread cancellation
[android-x86/external-musl-libc.git]
/
src
/
fcntl
/
fcntl.c
1
#include <fcntl.h>
2
#include <unistd.h>
3
#include <stdarg.h>
4
#include "syscall.h"
5
#include "libc.h"
6
7
int fcntl(int fd, int cmd, ...)
8
{
9
long arg;
10
va_list ap;
11
va_start(ap, cmd);
12
arg = va_arg(ap, long);
13
va_end(ap);
14
if (cmd == F_SETFL) arg |= O_LARGEFILE;
15
if (cmd == F_SETLKW) return syscall_cp(SYS_fcntl, fd, cmd, arg);
16
return syscall(SYS_fcntl, fd, cmd, arg);
17
}
18
19
LFS64(fcntl);