mirror of
https://github.com/fluencelabs/musl
synced 2025-06-14 07:21:40 +00:00
this was originally written for an early draft of the library where non-standard functions would reside in a static library separate from the shared libc.so, which would implement a pure standard. the idea was not to depend on an implementation-dependent __syscall_ret function in the main libc. but it turned out to be better to put everything in a single library for both static and dynamic linking uses, and thus the (incomplete) remnants of this feature were just enlarging the source and binary.
8 lines
118 B
C
8 lines
118 B
C
#include <unistd.h>
|
|
#include "syscall.h"
|
|
|
|
int chroot(const char *path)
|
|
{
|
|
return syscall1(__NR_chroot, (long)path);
|
|
}
|