使用union sigval遇到的编译问题

今天写代码的时候用union sigval这个数据类型编译报错了,提示hash incomplete type,
但是我包含了<time.h>,最后找了半天原因,应该是前面包含的哪个头文件里面也有union sigval这个类型,但是结构不一样,也没找到是哪个头文件引起的,我把我引用的头文件附在下面,哪位大佬知道也可以评论下

#include <stdio.h>
#include <time.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <arpa/inet.h>
#include <limits.h>
#include <pthread.h>
#include <sys/stat.h>
#include <fcntl.h>

报错内容如下
在这里插入图片描述
最后我解决办法比较简单粗暴,,hhh,直接在文件头部重新定义了一下这个结构体编译就通过啦。
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_38721267/article/details/127478021