Browse Source

Merge pull request #233 from zangent/master

Make macOS builds work again
gingerBill 7 years ago
parent
commit
3de23eb0bf
2 changed files with 4 additions and 3 deletions
  1. 3 2
      core/os/os_osx.odin
  2. 1 1
      src/common.cpp

+ 3 - 2
core/os/os_osx.odin

@@ -3,6 +3,7 @@ package os
 foreign import dl   "system:dl"
 foreign import libc "system:c"
 
+import "core:runtime"
 import "core:strings"
 
 OS :: "osx";
@@ -287,8 +288,8 @@ dlerror :: proc() -> string {
 
 
 _alloc_command_line_arguments :: proc() -> []string {
-	args := make([]string, len(__args__));
-	for arg, i in __args__ {
+	args := make([]string, len(runtime.args__));
+	for arg, i in runtime.args__ {
 		args[i] = string(arg);
 	}
 	return args;

+ 1 - 1
src/common.cpp

@@ -822,7 +822,7 @@ ReadDirectoryError read_directory(String path, Array<FileInfo> *fi) {
 
 	return ReadDirectory_None;
 }
-#elif defined(GB_SYSTEM_LINUX)
+#elif defined(GB_SYSTEM_LINUX) || defined(GB_SYSTEM_OSX)
 
 #include <dirent.h>