gpt4 book ai didi

c - linux/ext2_fs.h 有什么问题?

转载 作者:太空宇宙 更新时间:2023-11-04 01:13:24 24 4
gpt4 key购买 nike

猫主.c

#include <stdio.h>
#include <stdlib.h>
#include <linux/ext2_fs.h>

int main(int argc, char** argv) {

return (EXIT_SUCCESS);
}

这是我的输出...

gcc main.c In file included from main.c:3:

/usr/include/linux/ext2_fs.h: In function ‘ext2_mask_flags’:

/usr/include/linux/ext2_fs.h:182: error: ‘FS_DIRSYNC_FL’ undeclared (first use in this function)

/usr/include/linux/ext2_fs.h:182: error: (Each undeclared identifier is reported only once

/usr/include/linux/ext2_fs.h:182: error: for each function it appears in.)

/usr/include/linux/ext2_fs.h:182: error: ‘FS_TOPDIR_FL’ undeclared (first use in this function)

/usr/include/linux/ext2_fs.h:184: error: ‘FS_NODUMP_FL’ undeclared (first use in this function)

/usr/include/linux/ext2_fs.h:184: error: ‘FS_NOATIME_FL’ undeclared (first use in this function)

如果我删除 #include <linux/ext2_fs.h>程序编译成功...

最佳答案

您需要添加 #include <linux/fs.h>

关于c - linux/ext2_fs.h 有什么问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6969303/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com