编译 systrace 给出“声明说明符中的两个或多个数据类型”
我一直在尝试在 Ubuntu 上编译 systrace (1.6g)。当我使用 libevent 2.0.16 时,出现以下编译错误:
In file included from /usr/include/netdb.h:28,
from /usr/include/event2/util.h:63,
from /usr/include/evutil.h:37,
from /usr/include/event.h:57,
from systrace.c:67:
/usr/include/netinet/in.h:141: error: two or more data types in declaration specifiers
/usr/include/netinet/in.h:141: error: two or more data types in declaration specifiers
这些是 /usr/include/netinet/in.h 中的相应行:
/* Internet address. */
typedef uint32_t in_addr_t;
struct in_addr
{
in_addr_t s_addr;
};
任何人都可以提供有关我可以在 netinet/in.h 中更改哪些内容的见解让它发挥作用吗?
I have been trying to compile systrace (1.6g) on Ubuntu. When I am using libevent 2.0.16, I get the following compilation error:
In file included from /usr/include/netdb.h:28,
from /usr/include/event2/util.h:63,
from /usr/include/evutil.h:37,
from /usr/include/event.h:57,
from systrace.c:67:
/usr/include/netinet/in.h:141: error: two or more data types in declaration specifiers
/usr/include/netinet/in.h:141: error: two or more data types in declaration specifiers
These are the corresponding lines in /usr/include/netinet/in.h:
/* Internet address. */
typedef uint32_t in_addr_t;
struct in_addr
{
in_addr_t s_addr;
};
Can anyone provide any insight on what I could change in netinet/in.h to get it to work?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以查看
config.h
(通过运行./configure
创建)并找到注释行(或删除它),您至少可以进一步编译这显然不知何故损坏了包裹。
只是猜测:由于 systrace 1.6g 很旧,因此可能需要使用 libevent 1.xy 来编译它。
您可能想在此处下载当前的 libevent 1 软件包。
You might look into
config.h
(created by running./configure
) and find the lineComment it out (or delete it) and you might at least get further in compiling this obviously somehow broken package.
Just a guess: As systrace 1.6g is quiet old it might be necessary to use libevent 1.x.y to compile it.
You might like to download the current libevent 1 package here.