Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(391)

Unified Diff: pkg/os/lib/src/system_posix.dart

Issue 2203023002: Make arch-specific constants dependent on sys.info().machine (Closed) Base URL: git@github.com:dartino/sdk.git@master
Patch Set: Minor modifications. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/os/lib/src/system_linux.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/os/lib/src/system_posix.dart
diff --git a/pkg/os/lib/src/system_posix.dart b/pkg/os/lib/src/system_posix.dart
index a18ef4313b377b7cff562bad1103a760f50595ac..47b3e4c44daa5fa04a9fd447e3c3332220310f33 100644
--- a/pkg/os/lib/src/system_posix.dart
+++ b/pkg/os/lib/src/system_posix.dart
@@ -59,11 +59,13 @@ abstract class PosixSystem implements System {
static final ForeignFunction _uname =
ForeignLibrary.main.lookup("uname");
+ static final bool isMips = sys.info().machine == 'mips';
+
int get AF_INET => 2;
int get AF_INET6;
- int get SOCK_STREAM => 1;
- int get SOCK_DGRAM => 2;
+ int get SOCK_STREAM => isMips ? 2 : 1;
+ int get SOCK_DGRAM => isMips ? 1 : 2;
int get O_RDONLY => 0;
int get O_WRONLY => 1;
« no previous file with comments | « pkg/os/lib/src/system_linux.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698