summaryrefslogtreecommitdiff
path: root/kernel/syscalls.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/syscalls.c')
-rw-r--r--kernel/syscalls.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/kernel/syscalls.c b/kernel/syscalls.c
index e3db767..c507a4e 100644
--- a/kernel/syscalls.c
+++ b/kernel/syscalls.c
@@ -10,6 +10,9 @@
#include <stdbool.h>
#include <stddef.h>
+// TODO: use includes!!!
+uint64_t timer_get_ms();
+
int syscall_unhandled(int nr)
{
log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"syscall: %d", nr);
@@ -20,13 +23,15 @@ int syscall_gettimeofday(struct timeval *tv, struct timezone *tz)
{
if(tv!=NULL)
{
- uint32_t t=timer_get_ms();
- tv->tv_sec=t/1000;
+ uint64_t t=timer_get_ms();
+ tv->tv_sec=t/1000+2*3600; // add gmt+2
tv->tv_usec=0;//t-tv->tv_sec*1000;
}
+
+ // tz struct is obsolote
if(tz!=NULL)
{
- tz->tz_minuteswest=0;
+ tz->tz_minuteswest=0;// -21*60; // warsaw
tz->tz_dsttime=DST_NONE;
}
return 0;