aboutsummaryrefslogtreecommitdiff
path: root/src/unistd
diff options
context:
space:
mode:
Diffstat (limited to 'src/unistd')
-rw-r--r--src/unistd/_exit.c8
-rw-r--r--src/unistd/access.c8
-rw-r--r--src/unistd/acct.c8
-rw-r--r--src/unistd/alarm.c8
-rw-r--r--src/unistd/chdir.c8
-rw-r--r--src/unistd/chown.c8
-rw-r--r--src/unistd/close.c8
-rw-r--r--src/unistd/ctermid.c8
-rw-r--r--src/unistd/dup.c8
-rw-r--r--src/unistd/dup2.c8
-rw-r--r--src/unistd/dup3.c8
-rw-r--r--src/unistd/faccessat.c8
-rw-r--r--src/unistd/fchdir.c8
-rw-r--r--src/unistd/fchown.c8
-rw-r--r--src/unistd/fchownat.c8
-rw-r--r--src/unistd/fdatasync.c8
-rw-r--r--src/unistd/fsync.c8
-rw-r--r--src/unistd/ftruncate.c8
-rw-r--r--src/unistd/getcwd.c8
-rw-r--r--src/unistd/getegid.c8
-rw-r--r--src/unistd/geteuid.c8
-rw-r--r--src/unistd/getgid.c8
-rw-r--r--src/unistd/getgroups.c8
-rw-r--r--src/unistd/gethostname.c8
-rw-r--r--src/unistd/getlogin.c8
-rw-r--r--src/unistd/getlogin_r.c8
-rw-r--r--src/unistd/getpgid.c8
-rw-r--r--src/unistd/getpgrp.c8
-rw-r--r--src/unistd/getpid.c8
-rw-r--r--src/unistd/getppid.c8
-rw-r--r--src/unistd/getsid.c8
-rw-r--r--src/unistd/getuid.c8
-rw-r--r--src/unistd/isatty.c8
-rw-r--r--src/unistd/lchown.c8
-rw-r--r--src/unistd/link.c8
-rw-r--r--src/unistd/linkat.c8
-rw-r--r--src/unistd/lseek.c8
-rw-r--r--src/unistd/nice.c8
-rw-r--r--src/unistd/pause.c8
-rw-r--r--src/unistd/pipe.c8
-rw-r--r--src/unistd/pipe2.c8
-rw-r--r--src/unistd/posix_close.c8
-rw-r--r--src/unistd/pread.c8
-rw-r--r--src/unistd/preadv.c8
-rw-r--r--src/unistd/pwrite.c8
-rw-r--r--src/unistd/pwritev.c8
-rw-r--r--src/unistd/read.c8
-rw-r--r--src/unistd/readlink.c8
-rw-r--r--src/unistd/readlinkat.c8
-rw-r--r--src/unistd/readv.c8
-rw-r--r--src/unistd/renameat.c8
-rw-r--r--src/unistd/rmdir.c8
-rw-r--r--src/unistd/setegid.c8
-rw-r--r--src/unistd/seteuid.c8
-rw-r--r--src/unistd/setgid.c8
-rw-r--r--src/unistd/setpgid.c8
-rw-r--r--src/unistd/setpgrp.c8
-rw-r--r--src/unistd/setregid.c8
-rw-r--r--src/unistd/setresgid.c8
-rw-r--r--src/unistd/setresuid.c8
-rw-r--r--src/unistd/setreuid.c8
-rw-r--r--src/unistd/setsid.c8
-rw-r--r--src/unistd/setuid.c8
-rw-r--r--src/unistd/setxid.c8
-rw-r--r--src/unistd/sleep.c8
-rw-r--r--src/unistd/symlink.c8
-rw-r--r--src/unistd/symlinkat.c8
-rw-r--r--src/unistd/sync.c8
-rw-r--r--src/unistd/tcgetpgrp.c8
-rw-r--r--src/unistd/tcsetpgrp.c8
-rw-r--r--src/unistd/truncate.c8
-rw-r--r--src/unistd/ttyname.c8
-rw-r--r--src/unistd/ttyname_r.c8
-rw-r--r--src/unistd/ualarm.c8
-rw-r--r--src/unistd/unlink.c8
-rw-r--r--src/unistd/unlinkat.c8
-rw-r--r--src/unistd/usleep.c8
-rw-r--r--src/unistd/write.c8
-rw-r--r--src/unistd/writev.c8
79 files changed, 632 insertions, 0 deletions
diff --git a/src/unistd/_exit.c b/src/unistd/_exit.c
index 76994823..36af5204 100644
--- a/src/unistd/_exit.c
+++ b/src/unistd/_exit.c
@@ -5,3 +5,11 @@ _Noreturn void _exit(int status)
{
_Exit(status);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/access.c b/src/unistd/access.c
index d6eed683..7c8ed898 100644
--- a/src/unistd/access.c
+++ b/src/unistd/access.c
@@ -10,3 +10,11 @@ int access(const char *filename, int amode)
return syscall(SYS_faccessat, AT_FDCWD, filename, amode, 0);
#endif
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/acct.c b/src/unistd/acct.c
index 308ffc38..b9e50e32 100644
--- a/src/unistd/acct.c
+++ b/src/unistd/acct.c
@@ -6,3 +6,11 @@ int acct(const char *filename)
{
return syscall(SYS_acct, filename);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/alarm.c b/src/unistd/alarm.c
index a5e0c822..64d4887d 100644
--- a/src/unistd/alarm.c
+++ b/src/unistd/alarm.c
@@ -8,3 +8,11 @@ unsigned alarm(unsigned seconds)
setitimer(ITIMER_REAL, &it, &old);
return old.it_value.tv_sec + !!old.it_value.tv_usec;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/chdir.c b/src/unistd/chdir.c
index 5ba78b63..893d44e4 100644
--- a/src/unistd/chdir.c
+++ b/src/unistd/chdir.c
@@ -5,3 +5,11 @@ int chdir(const char *path)
{
return syscall(SYS_chdir, path);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/chown.c b/src/unistd/chown.c
index 14b03255..00bf27d1 100644
--- a/src/unistd/chown.c
+++ b/src/unistd/chown.c
@@ -10,3 +10,11 @@ int chown(const char *path, uid_t uid, gid_t gid)
return syscall(SYS_fchownat, AT_FDCWD, path, uid, gid, 0);
#endif
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/close.c b/src/unistd/close.c
index a2105f50..7da59568 100644
--- a/src/unistd/close.c
+++ b/src/unistd/close.c
@@ -17,3 +17,11 @@ int close(int fd)
if (r == -EINTR) r = 0;
return __syscall_ret(r);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/ctermid.c b/src/unistd/ctermid.c
index 1612770a..0b81f85c 100644
--- a/src/unistd/ctermid.c
+++ b/src/unistd/ctermid.c
@@ -5,3 +5,11 @@ char *ctermid(char *s)
{
return s ? strcpy(s, "/dev/tty") : "/dev/tty";
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/dup.c b/src/unistd/dup.c
index 7fee0120..02b6a665 100644
--- a/src/unistd/dup.c
+++ b/src/unistd/dup.c
@@ -5,3 +5,11 @@ int dup(int fd)
{
return syscall(SYS_dup, fd);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/dup2.c b/src/unistd/dup2.c
index 8f43c6dd..98c2830d 100644
--- a/src/unistd/dup2.c
+++ b/src/unistd/dup2.c
@@ -18,3 +18,11 @@ int dup2(int old, int new)
#endif
return __syscall_ret(r);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/dup3.c b/src/unistd/dup3.c
index 40798bde..47c2158b 100644
--- a/src/unistd/dup3.c
+++ b/src/unistd/dup3.c
@@ -24,3 +24,11 @@ int __dup3(int old, int new, int flags)
}
weak_alias(__dup3, dup3);
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/faccessat.c b/src/unistd/faccessat.c
index 557503eb..605300d0 100644
--- a/src/unistd/faccessat.c
+++ b/src/unistd/faccessat.c
@@ -59,3 +59,11 @@ int faccessat(int fd, const char *filename, int amode, int flag)
return __syscall_ret(ret);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/fchdir.c b/src/unistd/fchdir.c
index dee45ba6..1a9aad60 100644
--- a/src/unistd/fchdir.c
+++ b/src/unistd/fchdir.c
@@ -13,3 +13,11 @@ int fchdir(int fd)
__procfdname(buf, fd);
return syscall(SYS_chdir, buf);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/fchown.c b/src/unistd/fchown.c
index 737b3672..b1a5290d 100644
--- a/src/unistd/fchown.c
+++ b/src/unistd/fchown.c
@@ -18,3 +18,11 @@ int fchown(int fd, uid_t uid, gid_t gid)
#endif
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/fchownat.c b/src/unistd/fchownat.c
index 62457a3e..189f1adc 100644
--- a/src/unistd/fchownat.c
+++ b/src/unistd/fchownat.c
@@ -5,3 +5,11 @@ int fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag)
{
return syscall(SYS_fchownat, fd, path, uid, gid, flag);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/fdatasync.c b/src/unistd/fdatasync.c
index 3895ae53..10454721 100644
--- a/src/unistd/fdatasync.c
+++ b/src/unistd/fdatasync.c
@@ -5,3 +5,11 @@ int fdatasync(int fd)
{
return syscall_cp(SYS_fdatasync, fd);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/fsync.c b/src/unistd/fsync.c
index 7a1c80b5..348f2144 100644
--- a/src/unistd/fsync.c
+++ b/src/unistd/fsync.c
@@ -5,3 +5,11 @@ int fsync(int fd)
{
return syscall_cp(SYS_fsync, fd);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/ftruncate.c b/src/unistd/ftruncate.c
index 54ff34bc..7a8fa716 100644
--- a/src/unistd/ftruncate.c
+++ b/src/unistd/ftruncate.c
@@ -5,3 +5,11 @@ int ftruncate(int fd, off_t length)
{
return syscall(SYS_ftruncate, fd, __SYSCALL_LL_O(length));
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/getcwd.c b/src/unistd/getcwd.c
index f407ffe0..5c29f699 100644
--- a/src/unistd/getcwd.c
+++ b/src/unistd/getcwd.c
@@ -23,3 +23,11 @@ char *getcwd(char *buf, size_t size)
}
return buf == tmp ? strdup(buf) : buf;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/getegid.c b/src/unistd/getegid.c
index 6287490d..01bf2aad 100644
--- a/src/unistd/getegid.c
+++ b/src/unistd/getegid.c
@@ -5,3 +5,11 @@ gid_t getegid(void)
{
return __syscall(SYS_getegid);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/geteuid.c b/src/unistd/geteuid.c
index 88f2cd53..8ed2c28e 100644
--- a/src/unistd/geteuid.c
+++ b/src/unistd/geteuid.c
@@ -5,3 +5,11 @@ uid_t geteuid(void)
{
return __syscall(SYS_geteuid);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/getgid.c b/src/unistd/getgid.c
index 1c9fe715..1ffc51c9 100644
--- a/src/unistd/getgid.c
+++ b/src/unistd/getgid.c
@@ -5,3 +5,11 @@ gid_t getgid(void)
{
return __syscall(SYS_getgid);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/getgroups.c b/src/unistd/getgroups.c
index 0e6e63af..f0260817 100644
--- a/src/unistd/getgroups.c
+++ b/src/unistd/getgroups.c
@@ -5,3 +5,11 @@ int getgroups(int count, gid_t list[])
{
return syscall(SYS_getgroups, count, list);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/gethostname.c b/src/unistd/gethostname.c
index 633ef571..8dab0811 100644
--- a/src/unistd/gethostname.c
+++ b/src/unistd/gethostname.c
@@ -11,3 +11,11 @@ int gethostname(char *name, size_t len)
if (i && i==len) name[i-1] = 0;
return 0;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/getlogin.c b/src/unistd/getlogin.c
index 06011913..af8372a4 100644
--- a/src/unistd/getlogin.c
+++ b/src/unistd/getlogin.c
@@ -5,3 +5,11 @@ char *getlogin(void)
{
return getenv("LOGNAME");
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/getlogin_r.c b/src/unistd/getlogin_r.c
index 53866c6d..168d25e5 100644
--- a/src/unistd/getlogin_r.c
+++ b/src/unistd/getlogin_r.c
@@ -10,3 +10,11 @@ int getlogin_r(char *name, size_t size)
strcpy(name, logname);
return 0;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/getpgid.c b/src/unistd/getpgid.c
index d295bfd5..ed44aa96 100644
--- a/src/unistd/getpgid.c
+++ b/src/unistd/getpgid.c
@@ -5,3 +5,11 @@ pid_t getpgid(pid_t pid)
{
return syscall(SYS_getpgid, pid);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/getpgrp.c b/src/unistd/getpgrp.c
index 90e9bb07..5a8a8964 100644
--- a/src/unistd/getpgrp.c
+++ b/src/unistd/getpgrp.c
@@ -5,3 +5,11 @@ pid_t getpgrp(void)
{
return __syscall(SYS_getpgid, 0);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/getpid.c b/src/unistd/getpid.c
index a6d4e6d1..94958af9 100644
--- a/src/unistd/getpid.c
+++ b/src/unistd/getpid.c
@@ -5,3 +5,11 @@ pid_t getpid(void)
{
return __syscall(SYS_getpid);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/getppid.c b/src/unistd/getppid.c
index 05cade53..b42a7c98 100644
--- a/src/unistd/getppid.c
+++ b/src/unistd/getppid.c
@@ -5,3 +5,11 @@ pid_t getppid(void)
{
return __syscall(SYS_getppid);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/getsid.c b/src/unistd/getsid.c
index 93ba690e..da4479cc 100644
--- a/src/unistd/getsid.c
+++ b/src/unistd/getsid.c
@@ -5,3 +5,11 @@ pid_t getsid(pid_t pid)
{
return syscall(SYS_getsid, pid);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/getuid.c b/src/unistd/getuid.c
index 61309d1b..9aae884d 100644
--- a/src/unistd/getuid.c
+++ b/src/unistd/getuid.c
@@ -5,3 +5,11 @@ uid_t getuid(void)
{
return __syscall(SYS_getuid);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/isatty.c b/src/unistd/isatty.c
index 75a9c186..06d5565f 100644
--- a/src/unistd/isatty.c
+++ b/src/unistd/isatty.c
@@ -11,3 +11,11 @@ int isatty(int fd)
if (errno != EBADF) errno = ENOTTY;
return 0;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/lchown.c b/src/unistd/lchown.c
index ccd5ee02..604d70ff 100644
--- a/src/unistd/lchown.c
+++ b/src/unistd/lchown.c
@@ -10,3 +10,11 @@ int lchown(const char *path, uid_t uid, gid_t gid)
return syscall(SYS_fchownat, AT_FDCWD, path, uid, gid, AT_SYMLINK_NOFOLLOW);
#endif
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/link.c b/src/unistd/link.c
index feec18e5..b4290edd 100644
--- a/src/unistd/link.c
+++ b/src/unistd/link.c
@@ -10,3 +10,11 @@ int link(const char *existing, const char *new)
return syscall(SYS_linkat, AT_FDCWD, existing, AT_FDCWD, new, 0);
#endif
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/linkat.c b/src/unistd/linkat.c
index 6a9a0b77..facc93f2 100644
--- a/src/unistd/linkat.c
+++ b/src/unistd/linkat.c
@@ -5,3 +5,11 @@ int linkat(int fd1, const char *existing, int fd2, const char *new, int flag)
{
return syscall(SYS_linkat, fd1, existing, fd2, new, flag);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/lseek.c b/src/unistd/lseek.c
index f5b66682..be3e74a8 100644
--- a/src/unistd/lseek.c
+++ b/src/unistd/lseek.c
@@ -12,3 +12,11 @@ off_t __lseek(int fd, off_t offset, int whence)
}
weak_alias(__lseek, lseek);
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/nice.c b/src/unistd/nice.c
index 1c2295ff..6374259a 100644
--- a/src/unistd/nice.c
+++ b/src/unistd/nice.c
@@ -21,3 +21,11 @@ int nice(int inc)
return prio;
}
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/pause.c b/src/unistd/pause.c
index 90bbf4ca..7cc98a8e 100644
--- a/src/unistd/pause.c
+++ b/src/unistd/pause.c
@@ -9,3 +9,11 @@ int pause(void)
return syscall_cp(SYS_ppoll, 0, 0, 0, 0);
#endif
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/pipe.c b/src/unistd/pipe.c
index d07b8d24..b0c690ea 100644
--- a/src/unistd/pipe.c
+++ b/src/unistd/pipe.c
@@ -9,3 +9,11 @@ int pipe(int fd[2])
return syscall(SYS_pipe2, fd, 0);
#endif
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/pipe2.c b/src/unistd/pipe2.c
index a096990b..66127d2c 100644
--- a/src/unistd/pipe2.c
+++ b/src/unistd/pipe2.c
@@ -21,3 +21,11 @@ int pipe2(int fd[2], int flag)
}
return 0;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/posix_close.c b/src/unistd/posix_close.c
index 90f51a82..8418886b 100644
--- a/src/unistd/posix_close.c
+++ b/src/unistd/posix_close.c
@@ -4,3 +4,11 @@ int posix_close(int fd, int flags)
{
return close(fd);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/pread.c b/src/unistd/pread.c
index b03fb0ad..0d69e11b 100644
--- a/src/unistd/pread.c
+++ b/src/unistd/pread.c
@@ -5,3 +5,11 @@ ssize_t pread(int fd, void *buf, size_t size, off_t ofs)
{
return syscall_cp(SYS_pread, fd, buf, size, __SYSCALL_LL_PRW(ofs));
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/preadv.c b/src/unistd/preadv.c
index 890ab403..3252e383 100644
--- a/src/unistd/preadv.c
+++ b/src/unistd/preadv.c
@@ -8,3 +8,11 @@ ssize_t preadv(int fd, const struct iovec *iov, int count, off_t ofs)
return syscall_cp(SYS_preadv, fd, iov, count,
(long)(ofs), (long)(ofs>>32));
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/pwrite.c b/src/unistd/pwrite.c
index 869b69f0..bfdf0c59 100644
--- a/src/unistd/pwrite.c
+++ b/src/unistd/pwrite.c
@@ -5,3 +5,11 @@ ssize_t pwrite(int fd, const void *buf, size_t size, off_t ofs)
{
return syscall_cp(SYS_pwrite, fd, buf, size, __SYSCALL_LL_PRW(ofs));
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/pwritev.c b/src/unistd/pwritev.c
index becf9deb..924020ee 100644
--- a/src/unistd/pwritev.c
+++ b/src/unistd/pwritev.c
@@ -8,3 +8,11 @@ ssize_t pwritev(int fd, const struct iovec *iov, int count, off_t ofs)
return syscall_cp(SYS_pwritev, fd, iov, count,
(long)(ofs), (long)(ofs>>32));
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/read.c b/src/unistd/read.c
index f3589c05..e902fe41 100644
--- a/src/unistd/read.c
+++ b/src/unistd/read.c
@@ -5,3 +5,11 @@ ssize_t read(int fd, void *buf, size_t count)
{
return syscall_cp(SYS_read, fd, buf, count);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/readlink.c b/src/unistd/readlink.c
index 32f4537f..9a16ce52 100644
--- a/src/unistd/readlink.c
+++ b/src/unistd/readlink.c
@@ -17,3 +17,11 @@ ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsize)
if (buf == dummy && r > 0) r = 0;
return __syscall_ret(r);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/readlinkat.c b/src/unistd/readlinkat.c
index f79d3d14..104163df 100644
--- a/src/unistd/readlinkat.c
+++ b/src/unistd/readlinkat.c
@@ -12,3 +12,11 @@ ssize_t readlinkat(int fd, const char *restrict path, char *restrict buf, size_t
if (buf == dummy && r > 0) r = 0;
return __syscall_ret(r);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/readv.c b/src/unistd/readv.c
index 91e6de81..15962dc1 100644
--- a/src/unistd/readv.c
+++ b/src/unistd/readv.c
@@ -5,3 +5,11 @@ ssize_t readv(int fd, const struct iovec *iov, int count)
{
return syscall_cp(SYS_readv, fd, iov, count);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/renameat.c b/src/unistd/renameat.c
index c3b40a25..e0e83541 100644
--- a/src/unistd/renameat.c
+++ b/src/unistd/renameat.c
@@ -9,3 +9,11 @@ int renameat(int oldfd, const char *old, int newfd, const char *new)
return syscall(SYS_renameat2, oldfd, old, newfd, new, 0);
#endif
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/rmdir.c b/src/unistd/rmdir.c
index 6825ffc8..ea056162 100644
--- a/src/unistd/rmdir.c
+++ b/src/unistd/rmdir.c
@@ -10,3 +10,11 @@ int rmdir(const char *path)
return syscall(SYS_unlinkat, AT_FDCWD, path, AT_REMOVEDIR);
#endif
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/setegid.c b/src/unistd/setegid.c
index e6da2573..7a9ea395 100644
--- a/src/unistd/setegid.c
+++ b/src/unistd/setegid.c
@@ -6,3 +6,11 @@ int setegid(gid_t egid)
{
return __setxid(SYS_setresgid, -1, egid, -1);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/seteuid.c b/src/unistd/seteuid.c
index ef8b9df4..ebc05dd4 100644
--- a/src/unistd/seteuid.c
+++ b/src/unistd/seteuid.c
@@ -6,3 +6,11 @@ int seteuid(uid_t euid)
{
return __setxid(SYS_setresuid, -1, euid, -1);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/setgid.c b/src/unistd/setgid.c
index bae4616a..7a1d1255 100644
--- a/src/unistd/setgid.c
+++ b/src/unistd/setgid.c
@@ -6,3 +6,11 @@ int setgid(gid_t gid)
{
return __setxid(SYS_setgid, gid, 0, 0);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/setpgid.c b/src/unistd/setpgid.c
index 06160695..b66d171f 100644
--- a/src/unistd/setpgid.c
+++ b/src/unistd/setpgid.c
@@ -5,3 +5,11 @@ int setpgid(pid_t pid, pid_t pgid)
{
return syscall(SYS_setpgid, pid, pgid);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/setpgrp.c b/src/unistd/setpgrp.c
index a2a37f65..3a68846e 100644
--- a/src/unistd/setpgrp.c
+++ b/src/unistd/setpgrp.c
@@ -4,3 +4,11 @@ pid_t setpgrp(void)
{
return setpgid(0, 0);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/setregid.c b/src/unistd/setregid.c
index f5a8972a..bac7cb8d 100644
--- a/src/unistd/setregid.c
+++ b/src/unistd/setregid.c
@@ -6,3 +6,11 @@ int setregid(gid_t rgid, gid_t egid)
{
return __setxid(SYS_setregid, rgid, egid, 0);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/setresgid.c b/src/unistd/setresgid.c
index b9af540a..c79d31d2 100644
--- a/src/unistd/setresgid.c
+++ b/src/unistd/setresgid.c
@@ -7,3 +7,11 @@ int setresgid(gid_t rgid, gid_t egid, gid_t sgid)
{
return __setxid(SYS_setresgid, rgid, egid, sgid);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/setresuid.c b/src/unistd/setresuid.c
index 83692b4c..ab4a73be 100644
--- a/src/unistd/setresuid.c
+++ b/src/unistd/setresuid.c
@@ -7,3 +7,11 @@ int setresuid(uid_t ruid, uid_t euid, uid_t suid)
{
return __setxid(SYS_setresuid, ruid, euid, suid);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/setreuid.c b/src/unistd/setreuid.c
index 3fcc59e2..8f3790f4 100644
--- a/src/unistd/setreuid.c
+++ b/src/unistd/setreuid.c
@@ -6,3 +6,11 @@ int setreuid(uid_t ruid, uid_t euid)
{
return __setxid(SYS_setreuid, ruid, euid, 0);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/setsid.c b/src/unistd/setsid.c
index 609bbe4a..5fa87731 100644
--- a/src/unistd/setsid.c
+++ b/src/unistd/setsid.c
@@ -5,3 +5,11 @@ pid_t setsid(void)
{
return syscall(SYS_setsid);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/setuid.c b/src/unistd/setuid.c
index 602ecbbf..4511646d 100644
--- a/src/unistd/setuid.c
+++ b/src/unistd/setuid.c
@@ -6,3 +6,11 @@ int setuid(uid_t uid)
{
return __setxid(SYS_setuid, uid, 0, 0);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/setxid.c b/src/unistd/setxid.c
index a629ed4b..8f478e46 100644
--- a/src/unistd/setxid.c
+++ b/src/unistd/setxid.c
@@ -32,3 +32,11 @@ int __setxid(int nr, int id, int eid, int sid)
__synccall(do_setxid, &c);
return __syscall_ret(c.ret > 0 ? -EAGAIN : c.ret);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/sleep.c b/src/unistd/sleep.c
index d6450941..b4d68c63 100644
--- a/src/unistd/sleep.c
+++ b/src/unistd/sleep.c
@@ -8,3 +8,11 @@ unsigned sleep(unsigned seconds)
return tv.tv_sec;
return 0;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/symlink.c b/src/unistd/symlink.c
index 0973d78a..c8b0e1fa 100644
--- a/src/unistd/symlink.c
+++ b/src/unistd/symlink.c
@@ -10,3 +10,11 @@ int symlink(const char *existing, const char *new)
return syscall(SYS_symlinkat, existing, AT_FDCWD, new);
#endif
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/symlinkat.c b/src/unistd/symlinkat.c
index d1c59b4d..9b81ad90 100644
--- a/src/unistd/symlinkat.c
+++ b/src/unistd/symlinkat.c
@@ -5,3 +5,11 @@ int symlinkat(const char *existing, int fd, const char *new)
{
return syscall(SYS_symlinkat, existing, fd, new);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/sync.c b/src/unistd/sync.c
index f18765aa..70418d61 100644
--- a/src/unistd/sync.c
+++ b/src/unistd/sync.c
@@ -5,3 +5,11 @@ void sync(void)
{
__syscall(SYS_sync);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/tcgetpgrp.c b/src/unistd/tcgetpgrp.c
index 50080c7e..1924a406 100644
--- a/src/unistd/tcgetpgrp.c
+++ b/src/unistd/tcgetpgrp.c
@@ -9,3 +9,11 @@ pid_t tcgetpgrp(int fd)
return -1;
return pgrp;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/tcsetpgrp.c b/src/unistd/tcsetpgrp.c
index 67c38cb4..78941466 100644
--- a/src/unistd/tcsetpgrp.c
+++ b/src/unistd/tcsetpgrp.c
@@ -7,3 +7,11 @@ int tcsetpgrp(int fd, pid_t pgrp)
int pgrp_int = pgrp;
return ioctl(fd, TIOCSPGRP, &pgrp_int);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/truncate.c b/src/unistd/truncate.c
index 077351e1..8b7c6ffd 100644
--- a/src/unistd/truncate.c
+++ b/src/unistd/truncate.c
@@ -5,3 +5,11 @@ int truncate(const char *path, off_t length)
{
return syscall(SYS_truncate, path, __SYSCALL_LL_O(length));
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/ttyname.c b/src/unistd/ttyname.c
index 0f3e1141..c196c770 100644
--- a/src/unistd/ttyname.c
+++ b/src/unistd/ttyname.c
@@ -12,3 +12,11 @@ char *ttyname(int fd)
}
return buf;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/ttyname_r.c b/src/unistd/ttyname_r.c
index 82acb75e..f49d2be9 100644
--- a/src/unistd/ttyname_r.c
+++ b/src/unistd/ttyname_r.c
@@ -26,3 +26,11 @@ int ttyname_r(int fd, char *name, size_t size)
return 0;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/ualarm.c b/src/unistd/ualarm.c
index 2985855c..7d654f66 100644
--- a/src/unistd/ualarm.c
+++ b/src/unistd/ualarm.c
@@ -11,3 +11,11 @@ unsigned ualarm(unsigned value, unsigned interval)
setitimer(ITIMER_REAL, &it, &it_old);
return it_old.it_value.tv_sec*1000000 + it_old.it_value.tv_usec;
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/unlink.c b/src/unistd/unlink.c
index c40c28d5..b9f67b20 100644
--- a/src/unistd/unlink.c
+++ b/src/unistd/unlink.c
@@ -10,3 +10,11 @@ int unlink(const char *path)
return syscall(SYS_unlinkat, AT_FDCWD, path, 0);
#endif
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/unlinkat.c b/src/unistd/unlinkat.c
index e0e25d22..baa9c81e 100644
--- a/src/unistd/unlinkat.c
+++ b/src/unistd/unlinkat.c
@@ -5,3 +5,11 @@ int unlinkat(int fd, const char *path, int flag)
{
return syscall(SYS_unlinkat, fd, path, flag);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/usleep.c b/src/unistd/usleep.c
index 6c966526..d9d29481 100644
--- a/src/unistd/usleep.c
+++ b/src/unistd/usleep.c
@@ -10,3 +10,11 @@ int usleep(unsigned useconds)
};
return nanosleep(&tv, &tv);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/write.c b/src/unistd/write.c
index 8fd5bc5c..e651905a 100644
--- a/src/unistd/write.c
+++ b/src/unistd/write.c
@@ -5,3 +5,11 @@ ssize_t write(int fd, const void *buf, size_t count)
{
return syscall_cp(SYS_write, fd, buf, count);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif
diff --git a/src/unistd/writev.c b/src/unistd/writev.c
index 5a46c951..973db2ee 100644
--- a/src/unistd/writev.c
+++ b/src/unistd/writev.c
@@ -5,3 +5,11 @@ ssize_t writev(int fd, const struct iovec *iov, int count)
{
return syscall_cp(SYS_writev, fd, iov, count);
}
+
+
+#ifdef TEST
+int
+main(void) {
+ return 0;
+}
+#endif