| Index: runtime/bin/platform.cc
|
| diff --git a/runtime/bin/platform.cc b/runtime/bin/platform.cc
|
| index 97c1a6a91f40ca76caad58f8b95a211bb18971b3..f8398f415174719fb6ffcb594c9d64983281b8b0 100644
|
| --- a/runtime/bin/platform.cc
|
| +++ b/runtime/bin/platform.cc
|
| @@ -26,3 +26,16 @@ void FUNCTION_NAME(Platform_PathSeparator)(Dart_NativeArguments args) {
|
| Dart_SetReturnValue(args, Dart_NewString(File::PathSeparator()));
|
| Dart_ExitScope();
|
| }
|
| +
|
| +
|
| +void FUNCTION_NAME(Platform_LocalHostname)(Dart_NativeArguments args) {
|
| + Dart_EnterScope();
|
| + const intptr_t HOSTNAME_LENGTH = 256;
|
| + char hostname[HOSTNAME_LENGTH];
|
| + if (Platform::LocalHostname(hostname, HOSTNAME_LENGTH)) {
|
| + Dart_SetReturnValue(args, Dart_NewString(hostname));
|
| + } else {
|
| + Dart_SetReturnValue(args, DartUtils::NewDartOSError());
|
| + }
|
| + Dart_ExitScope();
|
| +}
|
|
|