Skip to content

Instantly share code, notes, and snippets.

@jonathanstowe
Created April 8, 2015 10:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathanstowe/65123671ccc8b8322c33 to your computer and use it in GitHub Desktop.
Save jonathanstowe/65123671ccc8b8322c33 to your computer and use it in GitHub Desktop.
native uname
use v6;
use NativeCall;
class Utsname is repr('CStruct') {
has Str $.sysname;
has Str $.nodename;
has Str $.release;
has Str $.version;
has Str $.machine;
}
sub uname(Utsname $utsname --> Int) is native { ... }
my $a = Utsname.new;
say $a;
say uname($a);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment