move use syscall code to libc