编译systrace会在声明说明符中提供“两个或更多数据类型”

时间:2012-01-06 12:02:48

标签: c ubuntu libevent

我一直在尝试在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中我可以更改的内容的任何见解,以使其工作吗?

1 个答案:

答案 0 :(得分:3)

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

#define in_addr_t unsigned long

将它注释掉(或删除它),你至少可以进一步编译这个明显不知何故的包。


只是猜测:因为systrace 1.6g很安静,所以可能需要使用libevent 1.x.y来编译它。

您可能希望下载当前的libevent 1软件包here