APUE练习的时候
编译的时候老是报警,说是未定义 SA_INTERRUPT
jasonleaster@ubuntu:/Ad_Pro_in_Unix/chapter_10$ cc ./pro_10_22.c
./pro_10_22.c: In function ‘main’:./pro_10_22.c:30:21: error: ‘SA_INTERRUPT’ undeclared (first use in this function)
./pro_10_22.c:30:21: note: each undeclared identifier is reported only once for each function it appears in
纠结了半天,发现是头文件的问题,不要用apue.h,并且一定要include <setjmp.h>
可能是冲突的原因。这里不要include <apue.h>
而是include <setjmp.h>
就可以了。编译正常