]>
git.proxmox.com Git - wasi-libc.git/blob - libc-top-half/musl/src/misc/uname.c
1b2b856b52520ca72e26433f284aef0cd48d09d1
1 #include <sys/utsname.h>
3 #ifdef __wasilibc_unmodified_upstream
8 int uname(struct utsname
*uts
)
10 #ifdef __wasilibc_unmodified_upstream
11 return syscall(SYS_uname
, uts
);
13 // Just fill in the fields with placeholder values.
14 strcpy(uts
->sysname
, "wasi");
15 strcpy(uts
->nodename
, "(none)");
16 strcpy(uts
->release
, "0.0.0");
17 strcpy(uts
->version
, "0.0.0");
18 #if defined(__wasm32__)
19 strcpy(uts
->machine
, "wasm32");
20 #elif defined(__wasm64__)
21 strcpy(uts
->machine
, "wasm64");
23 strcpy(uts
->machine
, "unknown");
26 strcpy(uts
->domainname
, "(none)");
28 strcpy(uts
->__domainname
, "(none)");