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.
7 lines
145 B
C
7 lines
145 B
C
#include <unistd.h>
|
|
#include "syscall.h"
|
|
|
|
int sethostname(const char *name, size_t len)
|
|
{
|
|
return syscall2(__NR_sethostname, (long)name, len);
|
|
}
|