Add sys_ prefix to unwrapped system calls

This change also implements getlogin() and getlogin_r().
This commit is contained in:
Justine Tunney 2022-09-13 11:20:35 -07:00
parent 8f5678882d
commit aab4ee4072
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
811 changed files with 1112 additions and 1796 deletions

View file

@ -17,7 +17,6 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/calls/calls.h"
#include "libc/intrin/strace.internal.h"
#include "libc/calls/struct/sigaction.h"
#include "libc/calls/struct/sigset.h"
#include "libc/calls/syscall-sysv.internal.h"
@ -25,6 +24,7 @@
#include "libc/dce.h"
#include "libc/errno.h"
#include "libc/intrin/bits.h"
#include "libc/intrin/strace.internal.h"
#include "libc/nexgen32e/kcpuids.h"
#include "libc/nexgen32e/rdtsc.h"
#include "libc/nexgen32e/vendor.internal.h"
@ -99,7 +99,7 @@ ssize_t getrandom(void *p, size_t n, unsigned f) {
cmd[1] = 81; /* KERN_ARND */
}
m = n;
if ((rc = sysctl(cmd, 2, p, &m, 0, 0)) != -1) {
if ((rc = sys_sysctl(cmd, 2, p, &m, 0, 0)) != -1) {
rc = m;
}
} else if (have_getrandom) {