Search code examples
cubuntulibevent

Compiling systrace gives "two or more data types in declaration specifiers"


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?


Solution

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