From dc5cf23066b81cc1401c5f46c3a5c3ed25e53e17 Mon Sep 17 00:00:00 2001 From: avanspector Date: Sun, 25 Feb 2024 16:50:04 +0100 Subject: [PATCH] add haiku to unix --- core/os/os_haiku.odin | 8 ++++++++ core/sys/unix/pthread_unix.odin | 2 +- core/sys/unix/time_unix.odin | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/core/os/os_haiku.odin b/core/os/os_haiku.odin index 5424e1c91..2646de0f8 100644 --- a/core/os/os_haiku.odin +++ b/core/os/os_haiku.odin @@ -101,3 +101,11 @@ close :: proc(fd: Handle) -> Errno { } return ERROR_NONE } + +_alloc_command_line_arguments :: proc() -> []string { + res := make([]string, len(runtime.args__)) + for arg, i in runtime.args__ { + res[i] = string(arg) + } + return res +} diff --git a/core/sys/unix/pthread_unix.odin b/core/sys/unix/pthread_unix.odin index 8bf397647..9fb029871 100644 --- a/core/sys/unix/pthread_unix.odin +++ b/core/sys/unix/pthread_unix.odin @@ -1,4 +1,4 @@ -//+build linux, darwin, freebsd, openbsd +//+build linux, darwin, freebsd, openbsd, haiku package unix foreign import "system:pthread" diff --git a/core/sys/unix/time_unix.odin b/core/sys/unix/time_unix.odin index 108067dd4..088dc378b 100644 --- a/core/sys/unix/time_unix.odin +++ b/core/sys/unix/time_unix.odin @@ -1,4 +1,4 @@ -//+build linux, darwin, freebsd, openbsd +//+build linux, darwin, freebsd, openbsd, haiku package unix when ODIN_OS == .Darwin {