2 * Copyright 2012, Denys Vlasenko
4 * Licensed under GPLv2, see file LICENSE in this source tree.
6 //kbuild:lib-y += missing_syscalls.o
10 #if defined(ANDROID) || defined(__ANDROID__)
11 /*# include <linux/timex.h> - for struct timex, but may collide with <time.h> */
12 # include <sys/syscall.h>
13 pid_t getsid(pid_t pid)
15 return syscall(__NR_getsid, pid);
18 int stime(const time_t *t)
23 return settimeofday(&tv, NULL);
26 int sethostname(const char *name, size_t len)
28 return syscall(__NR_sethostname, name, len);
32 int adjtimex(struct timex *buf)
34 return syscall(__NR_adjtimex, buf);
37 int pivot_root(const char *new_root, const char *put_old)
39 return syscall(__NR_pivot_root, new_root, put_old);
42 # if __ANDROID_API__ < 21
45 return ioctl(fd, TCSBRK, 1);