error: ‘struct dentry’ has no member named ‘d_count’

来源:互联网 发布:淘宝退款进度查询 编辑:程序博客网 时间:2024/04/29 15:03
error: ‘struct dentry’ has no member named ‘d_count’

新版内核中去掉了dentry结构体中的d_count成员,换成了d_count(dentry)方法。

我是在编译vmware-tools遇到这个问题的。全部错误信息如下:

  CC [M]  /tmp/modconfig-5cmo6T/vmhgfs-only/hgfsEscape.o  CC [M]  /tmp/modconfig-5cmo6T/vmhgfs-only/inode.o  CC [M]  /tmp/modconfig-5cmo6T/vmhgfs-only/dentry.o/tmp/modconfig-5cmo6T/vmhgfs-only/inode.c: In function ‘HgfsPermission’:/tmp/modconfig-5cmo6T/vmhgfs-only/inode.c:1893:29: error: ‘struct dentry’ has no member named ‘d_count’          int dcount = dentry->d_count;                             ^make[2]: *** [/tmp/modconfig-5cmo6T/vmhgfs-only/inode.o] Error 1make[2]: *** Waiting for unfinished jobs....make[1]: *** [_module_/tmp/modconfig-5cmo6T/vmhgfs-only] Error 2make[1]: Leaving directory `/usr/src/kernels/3.11.10-301.fc20.i686+PAE'make: *** [vmhgfs.ko] Error 2make: Leaving directory `/tmp/modconfig-5cmo6T/vmhgfs-only'

遇到这个问题直接进入

cd /usr/lib/vmware-tools/modules/sourcetar xf vmhgfs.tarcd vmhgfs-onlyvi inode.c

用以上方法修改错误行,再从新压成tar包即可。

0 0