diff --git a/sys/include/ape/unistd.h b/sys/include/ape/unistd.h index ae78fec36..936fbe8cb 100644 --- a/sys/include/ape/unistd.h +++ b/sys/include/ape/unistd.h @@ -121,6 +121,7 @@ extern pid_t setsid(void); /* files and directories */ extern int chdir(const char *); +extern int chroot(const char *); extern int link(const char *, const char *); extern char *getcwd(char *, size_t); extern int unlink(const char *); diff --git a/sys/src/ape/lib/ap/plan9/chroot.c b/sys/src/ape/lib/ap/plan9/chroot.c new file mode 100644 index 000000000..ed270ec81 --- /dev/null +++ b/sys/src/ape/lib/ap/plan9/chroot.c @@ -0,0 +1,9 @@ +#include +#include + +int +chroot(const char*) +{ + errno = EIO; + return -1; +} diff --git a/sys/src/ape/lib/ap/plan9/mkfile b/sys/src/ape/lib/ap/plan9/mkfile index 1da4318a4..8f9099e22 100644 --- a/sys/src/ape/lib/ap/plan9/mkfile +++ b/sys/src/ape/lib/ap/plan9/mkfile @@ -22,6 +22,7 @@ OFILES=\ brk.$O\ cfgetospeed.$O\ chdir.$O\ + chroot.$O\ chmod.$O\ chown.$O\ close.$O\