最近在看APUE,试了上面的一些例子,其中有个例子是使用getpid函数获取进程id,但是在我写demo时,并未引入其所在的头文件unistd.h,结果也能编译成功,也能运行,于是就琢磨下为啥. Environment info: Ubuntu 18.04.2 LTS, gcc (Ubuntu 4.8.5-4ubuntu8) 4.8.5 示意代码如下: int main (int argc, char *argv[]) { long pid = (long)getpid(); long test
arch/x86/kernel/ptrace.c:1472:17: error: conflicting types for 'syscall_trace_enter' In file included from /home/rex/Downloads/linux-2.6.32.60/arch/x86/include/asm/vm86.h:130:0, from /home/rex/Downloads/linux-2.6.32.60/arch/x86/in