编译 systrace 给出“声明说明符中的两个或多个数据类型”

发布于 2024-12-25 03:54:07 字数 731 浏览 3 评论 0原文

我一直在尝试在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

旧时模样 2025-01-01 03:54:07

您可以查看 config.h (通过运行 ./configure 创建)并找到注释行

#define in_addr_t unsigned long

(或删除它),您至少可以进一步编译这显然不知何故损坏了包裹。


只是猜测:由于 systrace 1.6g 很旧,因此可能需要使用 libevent 1.xy 来编译它。

您可能想在此处下载当前的 libevent 1 软件包。

You might look into config.h (created by running ./configure) and find the line

#define in_addr_t unsigned long

Comment 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文