浏览代码

Adds when statement for framework include

Platin21 5 年之前
父节点
当前提交
f7e40b8572
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. 8 1
      core/time/time_unix.odin

+ 8 - 1
core/time/time_unix.odin

@@ -3,7 +3,14 @@ package time
 
 IS_SUPPORTED :: true; // NOTE: Times on Darwin are UTC.
 
-foreign import libc "system:c"
+when ODIN_OS == "darwin" {
+  foreign import libc "System.framework"
+}
+
+when ODIN_OS != "darwin" {
+  foreign import libc "system:c"
+}
+
 
 @(default_calling_convention="c")
 foreign libc {