X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=psi.d%2Funame.psi;h=e5144da51026da4715322410c71a76c1c4ee4ec1;hp=c79cc8e8cb0aab1b4bf705f20f7f143d12624042;hb=601e13c0743234c53a62e68fc89f122069123c15;hpb=4b5ceb304b924c50eaf8263ad394493ff806fed4 diff --git a/psi.d/uname.psi b/psi.d/uname.psi index c79cc8e..e5144da 100644 --- a/psi.d/uname.psi +++ b/psi.d/uname.psi @@ -1,6 +1,8 @@ +#include + function psi\uname(array &$u = NULL) : int { - let name = calloc(1, struct utsname); - return to_int(uname); + let name = calloc(1, psi\SIZEOF_STRUCT_UTSNAME); + return uname(name) as to_int(uname); set $u = to_array(*name, to_string(sysname), to_string(nodename), @@ -8,4 +10,4 @@ function psi\uname(array &$u = NULL) : int { to_string(version), to_string(machine), to_string(domainname)); -} \ No newline at end of file +}