‘action’的存储大小未知

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/DONGHUIB/article/details/53414925


编译时遇到以下错误。

[root@centos-dh1 interrupt]# make
gcc -g -O2 -Wall -std=c99   -c -o interrupt.o interrupt.c
interrupt.c: 在函数‘s_catch_signals’中:
interrupt.c:33: 错误:‘action’的存储大小未知
interrupt.c:38: 警告:隐式声明函数‘sigemptyset’
interrupt.c:39: 警告:隐式声明函数‘sigaction’
interrupt.c:33: 警告:未使用的变量‘action’
make: *** [interrupt.o] 错误 1
[root@centos-dh1 interrupt]# vi Makefile
[root@centos-dh1 interrupt]#

关闭std=c99模式后就正常了。

[root@centos-dh1 interrupt]# make
gcc -g -O2 -Wall   -c -o interrupt.o interrupt.c
gcc -lzmq  interrupt.o   -o interrupt

不知道是什么原因。先记录在这里,以后有时间再想想。


猜你喜欢

转载自blog.csdn.net/DONGHUIB/article/details/53414925