I am testing some code examples of the K&R C book and it uses #include "syscalls.h"
in one of its programs but the compiler complains about unable to find the file. What should I replace syscalls.h
with? Is it deprecated?
Symbolic constants for system call numbers can be found in the header file <sys/syscall.
syscall() is a small library function that invokes the system call whose assembly language interface has the specified number with the specified arguments. Employing syscall() is useful, for example, when invoking a system call that has no wrapper function in the C library.
Section 2 of the manual describes the Linux system calls. A system call is an entry point into the Linux kernel.
You should probably use unistd.h
instead.
Check the man page for the call you're trying to make, as it is system dependent and can vary.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With