编译BusyBox之 error: unknown type name ‘umode_t’问题解决

本文解决了BusyBox编译过程中遇到的关于umode_t类型未定义的问题,通过将umode_t替换为unsigned short解决了编译错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

最近编译BusyBox时遇到了错误:

In file included from util-linux/mkfs_ext2.c:51:0:
include/linux/ext2_fs.h:209:37: error: unknown type name ‘umode_t’; did you mean ‘mode_t’?
static inline __u32 ext2_mask_flags(umode_t mode, __u32 flags)

解决办法:

通过搜寻,找到了Bug Fix:

Fix problem with undefined umode_t type in 3.3 kernel headers

 

解决办法:

在include/linux/ext2_fs.h 的209行处:

 static inline __u32 ext2_mask_flags(umode_t mode, __u32 flags)

修改为

 static inline __u32 ext2_mask_flags(unsigned short mode, __u32 flags)

 

再执行编译即通过。

 

转载于:https://www.cnblogs.com/skystars/p/8601197.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值