Implement no-op time() function
This commit is contained in:
parent
deb2ac7341
commit
8da5329a95
|
@ -15,10 +15,7 @@ time_t mktime(struct tm *ptr){
|
|||
__ensure(!"Not implemented");
|
||||
__builtin_unreachable();
|
||||
}
|
||||
time_t time(time_t *timer){
|
||||
__ensure(!"Not implemented");
|
||||
__builtin_unreachable();
|
||||
}
|
||||
// time() is provided by the platform
|
||||
int timespec_get(struct timespec *ptr, int base){
|
||||
__ensure(!"Not implemented");
|
||||
__builtin_unreachable();
|
||||
|
|
|
@ -6,7 +6,7 @@ $c_OBJDIR := $(BUILD_PATH)/$c/obj
|
|||
$c_BINDIR := $(BUILD_PATH)/$c/bin
|
||||
|
||||
$c_OBJECTS := entry.o ensure.o malloc.o file.o \
|
||||
fork-exec.o enter-fork.o \
|
||||
fork-exec.o enter-fork.o time.o \
|
||||
frigg-support.o
|
||||
$c_OBJECT_PATHS := $(addprefix $($c_OBJDIR)/,$($c_OBJECTS))
|
||||
|
||||
|
|
17
libc/platform/x86_64-managarm/src/time.cpp
Normal file
17
libc/platform/x86_64-managarm/src/time.cpp
Normal file
|
@ -0,0 +1,17 @@
|
|||
|
||||
#include <time.h>
|
||||
|
||||
#pragma GCC visibility push(hidden)
|
||||
|
||||
#include <frigg/debug.hpp>
|
||||
|
||||
#pragma GCC visibility pop
|
||||
|
||||
time_t time(time_t *out){
|
||||
frigg::infoLogger.log() << "mlibc: Broken time() called!" << frigg::EndLog();
|
||||
time_t result = 0;
|
||||
if(out)
|
||||
*out = result;
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in a new issue