Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCalvin <calvin@cmpct.info>2017-12-06 23:43:20 +0300
committerLudovic Henry <luhenry@microsoft.com>2017-12-06 23:43:20 +0300
commit5a581fb229331e0ebb0fd08065ff6d6164b8af85 (patch)
treee60bac229bda0644687503cabd64b308c31ce00f /support
parentb683e1076ab0c42dbb0effe12c0f199976e083db (diff)
Compile on amd64 Haiku (#4473)
* Compile on amd64 Haiku Use sigcontext (somewhat like win32, or x86) on Haiku amd64. On amd64, Haiku doesn't have issues with marshalling 64-bit values, but it currently does have issues with SGen either causing a stall or a core dump. As such, while it can compile the stdlib (further than x86 got), it's still a work in progress. * Use set_real_time_clock for sys-time.c on Haiku * Get mono-boehm compiling on Haiku again It still doesn't work. Initialization will call GC_mark_from, which will cause a segmentation fault as it decrements pointers. (Mono will enter an infinite loop in mono_get_hazardous_pointer as a result.) For now, mono-sgen will continue to be used by default.
Diffstat (limited to 'support')
-rw-r--r--support/sys-time.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/support/sys-time.c b/support/sys-time.c
index 83afa0c8466..4f5db9c8b22 100644
--- a/support/sys-time.c
+++ b/support/sys-time.c
@@ -10,6 +10,9 @@
#include <sys/types.h>
#include <sys/time.h>
#include <string.h>
+#ifdef __HAIKU__
+#include <os/kernel/OS.h>
+#endif
#include "map.h"
#include "mph.h"
@@ -47,11 +50,6 @@ Mono_Posix_Syscall_settimeofday (
struct Mono_Posix_Timeval *tv,
struct Mono_Posix_Timezone *tz)
{
-#if defined(__HAIKU__)
- /* FIXME: Haiku doesn't support this either, consider
- using set_real_time_clock instead? */
- return -1;
-#else
struct timeval _tv = {0};
struct timeval *ptv = NULL;
struct timezone _tz = {0};
@@ -69,10 +67,14 @@ Mono_Posix_Syscall_settimeofday (
ptz = &_tz;
}
+#ifdef __HAIKU__
+ set_real_time_clock(ptv->tv_sec);
+ r = 0;
+#else
r = settimeofday (ptv, ptz);
+#endif
return r;
-#endif
}
static inline struct timeval*