起因:在windows环境定义了一个结构体,结构如下。其实就是把linux上的某些struct抄了过来。

struct statx_timestamp {
	int64_t	tv_sec;
	uint32_t	tv_nsec;
	int32_t	__reserved;
};

但是,在编译的时候出现了error C2208: “int”: 没有使用此类型进 行定义的成员

因为本来是使用Vscode写代码,cmake+shell编译。将结构体转到Visual Studio 2022。出现波浪线警告。

原因:define _reserved _SAL1_Source(_reserved, (), _Reserved)

所以这。。。。竟然是个宏???告辞。还有个问腿就是对于平台兼容,各位大佬有什么好办法吗????