Hi guys, I am actually trying syscalls. Is it normal when I create a simple crystal code with a syscall I can’t compile it ?
I wrote this code to try:
module Init
Syscall.def_syscall reboot, Int64, magic : Int64, magic2 : Int64, op : Int64
end
Init.reboot(magic: 0xfee1dead,
magic2: 0x28121969,
op: 0x1234567)
And I am getting this error:
[fulgurance@alienware-m17-r3 Downloads]$ crystal build test.cr -o test
Showing last frame. Use --error-trace for full trace.
In test.cr:10:5
10 | Syscall.def_syscall reboot, Int64, magic : Int64, magic2 : Int64, op : Int64
^------
Error: undefined constant Syscall
The thing strange is this code can be compiled with an old version of crystal ! ( It can be compiled with 1.11.2 xD)