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 中更改哪些内容以使其正常工作的任何见解?

4

1 回答 1

3

您可能会查看config.h(通过运行创建./configure)并找到该行

#define in_addr_t unsigned long

将其注释掉(或删除),您至少可以进一步编译这个明显以某种方式损坏的包。


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

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

于 2012-01-06T13:04:09.087 回答