File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ int __syscall_uname(intptr_t buf) {
60
60
strcpy (utsname -> nodename , "emscripten" );
61
61
strcpy (utsname -> release , full_version );
62
62
strcpy (utsname -> version , "#1" );
63
- #ifdef __wams64__
63
+ #ifdef __wasm64__
64
64
strcpy (utsname -> machine , "wasm64" );
65
65
#else
66
66
strcpy (utsname -> machine , "wasm32" );
Original file line number Diff line number Diff line change 5
5
* found in the LICENSE file.
6
6
*/
7
7
8
+ #include <assert.h>
8
9
#include <stdio.h>
10
+ #include <string.h>
9
11
#include <sys/utsname.h>
10
12
11
13
int main () {
@@ -16,6 +18,12 @@ int main() {
16
18
printf ("release: %s\n" , u .release );
17
19
printf ("version: %s\n" , u .version );
18
20
printf ("machine: %s\n" , u .machine );
21
+ #ifdef __wasm64__
22
+ assert (strcmp (u .machine , "wasm64" ) == 0 );
23
+ #else
24
+ assert (strcmp (u .machine , "wasm32" ) == 0 );
25
+ #endif
19
26
printf ("invalid: %d\n" , uname (0 ));
27
+
20
28
return 0 ;
21
29
}
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ sysname: Emscripten
3
3
nodename: emscripten
4
4
release: \d+.\d+.\d+
5
5
version: #1
6
- machine: wasm32
6
+ machine: wasm(32|64)
You can’t perform that action at this time.
0 commit comments