LibC: Add stubs that I have locally

I'm not sure if these are used by anything but I would assume so as I
have added them :D

functions added:
- getprotobyname
- open_memstream
- munlock
- lockf
- nice
- crypt
- getsid
- wcstoul
This commit is contained in:
2026-01-06 16:06:40 +02:00
parent 89959b800c
commit a00695bdac
5 changed files with 49 additions and 0 deletions

View File

@@ -689,6 +689,30 @@ int getpagesize(void)
return PAGE_SIZE;
}
int lockf(int fildes, int function, off_t size)
{
(void)fildes;
(void)function;
(void)size;
derrorln("TODO: lockf");
ASSERT_NOT_REACHED();
}
int nice(int incr)
{
dwarnln("TODO: nice({})", incr);
errno = EPERM;
return -1;
}
char* crypt(const char* key, const char* salt)
{
(void)key;
(void)salt;
derrorln("TODO: crypt");
ASSERT_NOT_REACHED();
}
char* getpass(const char* prompt)
{
static char buffer[PASS_MAX];
@@ -774,6 +798,12 @@ pid_t getpgid(pid_t pid)
return syscall(SYS_GET_PGID, pid);
}
pid_t getsid(pid_t pid)
{
(void)pid;
ASSERT_NOT_REACHED();
}
int tcgetpgrp(int fildes)
{
return syscall(SYS_TCGETPGRP, fildes);