Menu

#22 ipcad 3.7.3 doesn't compile on ubuntu hardy

open
nobody
None
5
2008-06-01
2008-06-01
Anonymous
No

$ make
gcc -DIPCAD_VERSION=\"3.7.3\" -DCONFIG_FILE=\"/usr/local/etc/ipcad.conf\" -DHAVE_CONFIG_H -D_REENTRANT -D_THREAD_SAFE -DPSRC_pcap -DIFST_linux -g -O2 -I/usr/local/include -DHAVE_CONFIG_H -W -Wall -o main.o -c main.c
In file included from ipcad.h:33,
from main.c:29:
psrc.h:93: error: field ‘peer’ has incomplete type
make: *** [main.o] Error 1

----------

psrc.h:93 contains the following declaration
struct sockaddr_nl peer;

---------
the sockaddr_nl is defined in <linux/netlink.h>

---------
config.log:

configure:4687: checking for linux/netlink.h
configure:4705: gcc -c -g -O2 -I/usr/local/include -I/usr/local/include conftest.c >&5
In file included from /usr/include/linux/socket.h:23,
from conftest.c:39:
/usr/include/linux/uio.h:45: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'iov_length'
/usr/include/linux/uio.h:55: error: expected declaration specifiers or '...' before 'size_t'
configure:4711: $? = 1

-----------
/usr/include/linux/uio.h:45 contains the following code

static __inline__ size_t iov_length(const struct iovec *iov, unsigned long nr_segs)
{
unsigned long seg;
size_t ret = 0;

for (seg = 0; seg < nr_segs; seg++)
ret += iov[seg].iov_len;
return ret;
}

unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to);

Cheers,
Fedor Isakov.

fisakov@gmail.com

Discussion

  • Nobody/Anonymous

    Logged In: NO

    Correction: actually it's not hardy, it's gutsy, ubuntu 7.10.

     
  • Nobody/Anonymous

    Logged In: NO

    Correction2: after update to hardy it still doesn't compile, same errors.

     
  • Nobody/Anonymous

    Hi all,
    To solve this problem you need to add the following line in psrc.h file:

    #include <linux/netlink.h>

    After this ipcad was compiled successfully.

     
  • Nobody/Anonymous

    Thanks! - That's working for Debian/lenny, too!

     

Log in to post a comment.