mirror of
https://github.com/RGBCube/serenity
synced 2025-07-16 04:47:35 +00:00
Rage hacking to get bash to run. It finally runs. So cool! :^)
This commit is contained in:
parent
9b70808ab5
commit
d5d45d1088
31 changed files with 567 additions and 61 deletions
|
@ -1,9 +1,10 @@
|
|||
#include <stdlib.h>
|
||||
#include <mman.h>
|
||||
#include <sys/mman.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <alloca.h>
|
||||
#include <assert.h>
|
||||
#include <Kernel/Syscall.h>
|
||||
#include <AK/Assertions.h>
|
||||
|
||||
|
@ -54,11 +55,12 @@ void* calloc(size_t nmemb, size_t)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
void* realloc(void *ptr, size_t)
|
||||
void* realloc(void *ptr, size_t size)
|
||||
{
|
||||
(void) ptr;
|
||||
ASSERT_NOT_REACHED();
|
||||
return nullptr;
|
||||
// FIXME: This is broken as shit.
|
||||
auto* new_ptr = malloc(size);
|
||||
memcpy(new_ptr, ptr, size);
|
||||
return new_ptr;
|
||||
}
|
||||
|
||||
void exit(int status)
|
||||
|
@ -116,4 +118,13 @@ long atol(const char* str)
|
|||
return atoi(str);
|
||||
}
|
||||
|
||||
void __qsort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *))
|
||||
{
|
||||
(void) base;
|
||||
(void) nmemb;
|
||||
(void) size;
|
||||
(void) compar;
|
||||
assert(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue