美文网首页
编译zfs-fuse

编译zfs-fuse

作者: Armlinux | 来源:发表于2022-03-13 21:23 被阅读0次

lib/libsolkerncompat/vfs.c:291:27: error: expected expression before 'vfsops_t'

list_entry(pos,struct _MAC_DATA,list);
编译时出现如下错误:
 error: expected expression before 'struct'
原因是:
#define list_entry(ptr, type, member) ({ \ 
const typeof( ((type *)0)->member ) *__mptr = (ptr);\ 
(type *)( (char *)__mptr -  offsetof(type,member)  );\ 
}) 
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
此宏没有定义导致list_entry()调用失败!
解决方法:
包含头文件"unistd.h"即可。
其实真正声明offsetof()是在stddef.h头文件中。所以最好的方法是直接包含此头文件。

来自 http://blog.chinaunix.net/uid-28253945-id-3405862.html

lib/libsolkerncompat/vnode.c:95:25: error: expected expression before 'struct'

编译一个应用程序,报以下错误:

[root@localhost 3250RTC]# make

gcc -o 3250rtc 3250rtc.c

3250rtc.c: In function ‘update_rtc’:

3250rtc.c:47: error: expected expression before ‘struct’

make: *** [3250rtc] Error 1

解决办法:

#include <sys/ioctl.h>
#include <stddef.h>

fatal error: attr/xattr.h: No such file or

Fun, my setxattr man pages says you should include attr/xattr.h, and both attr/xattr.h and sys/xattr.h exist on my system. Attr version belongs to libattr1-dev and sys version belongs to libc6-dev.
https://github.com/pmem/pmemfile/issues/252

相关文章

  • 编译zfs-fuse

    lib/libsolkerncompat/vfs.c:291:27: error: expected expres...

  • dtb文件编译

    反编译 编译 批量反编译

  • 编译过程与静态库&动态库

    一、编译过程 1、预编译(Preprocessing) 预编译即预处理,编译器不能直接对预编译命令进行编译,必须在...

  • 宏、const、static、extern使用详解

    宏与const的区别 编译时刻:宏是预编译(编译之前处理),const是编译阶段。编译检查:宏不做检查,不会报编译...

  • iOS const 与宏

    编译时刻:宏是预编译(编译之前处理),const是编译阶段。 编译检查:宏不做检查,不会报编译错误,只是替换,co...

  • 2020-09-09 RK系统编译

    编译uboot: 编译kernel: 环境配置: 编译系统:

  • 程序编译过程

    本文编译的文件cpu架构为X86_64。 编译型语言编译过程主要有预编译、编译、汇编、链接。 预编译This st...

  • 自己动手编译OpenJDK

    Linux下 编译 Centos 下编译OpenJDK Mac下编译 MacOS 下编译OpenJDK Windo...

  • 宏 const static extern的区别与使用

    一. const 与 宏的区别 编译时刻: 宏是预编译(编译之前处理), const是编译阶段处理 编译检查: 宏...

  • 晚期(运行期)优化

    HotSpot的即时编译器 解释器与编译器 编译对象与触发条件 编译过程 编译优化技术 如果还对其他的经典编译优化...

网友评论

      本文标题:编译zfs-fuse

      本文链接:https://www.haomeiwen.com/subject/txsddrtx.html