Index: runtime/bin/platform_openbsd.cc |
diff --git a/runtime/bin/platform_linux.cc b/runtime/bin/platform_openbsd.cc |
similarity index 91% |
copy from runtime/bin/platform_linux.cc |
copy to runtime/bin/platform_openbsd.cc |
index 24cbfd3ebf58bd840cfffdfb17784544ffb332c7..3db59c019fe81eb76dc8862e7a48c1ed2ed9e929 100644 |
--- a/runtime/bin/platform_linux.cc |
+++ b/runtime/bin/platform_openbsd.cc |
@@ -3,7 +3,7 @@ |
// BSD-style license that can be found in the LICENSE file. |
#include "platform/globals.h" |
-#if defined(TARGET_OS_LINUX) |
+#if defined(TARGET_OS_OPENBSD) |
#include "bin/file.h" |
#include "bin/platform.h" |
@@ -14,6 +14,7 @@ |
#include "bin/fdutils.h" |
+extern char **environ; |
namespace dart { |
namespace bin { |
@@ -39,7 +40,7 @@ int Platform::NumberOfProcessors() { |
const char* Platform::OperatingSystem() { |
- return "linux"; |
+ return "openbsd"; |
} |
@@ -74,6 +75,7 @@ void Platform::FreeEnvironment(char** env, intptr_t count) { |
char* Platform::ResolveExecutablePath() { |
+ // FIXME: This won't work on OpenBSD the way it is now |
return File::LinkTarget("/proc/self/exe"); |
} |
@@ -84,4 +86,4 @@ void Platform::Exit(int exit_code) { |
} // namespace bin |
} // namespace dart |
-#endif // defined(TARGET_OS_LINUX) |
+#endif // defined(TARGET_OS_OPENBSD) |