Error building ocserv 0.2.2

Per Juborg per at juborg.nu
Sat Dec 7 18:53:28 EST 2013


Hi,

I tested bith moving it and removing the include of net/if.h, both helped.

Then I ran in to another include in tun.c to "net/if_tun.h" that don't exist in Apple headers so I removed that one.

Now it got a bit more complicated. Can anyone make anything out of this?
make  all-recursive
Making all in gl
make  all-recursive
make[4]: Nothing to be done for `all-am'.
Making all in src
Making all in pcl
make[3]: Nothing to be done for `all'.
  CC       icmp-ping.o
In file included from icmp-ping.c:76:
/usr/include/netinet/ip_icmp.h:92:4: error: unknown type name 'n_short'; did you mean 'u_short'?
                        n_short icd_id;
                        ^
/usr/include/sys/types.h:85:25: note: 'u_short' declared here
typedef unsigned short          u_short;
                                ^
In file included from icmp-ping.c:76:
/usr/include/netinet/ip_icmp.h:93:4: error: unknown type name 'n_short'; did you mean 'u_short'?
                        n_short icd_seq;
                        ^
/usr/include/sys/types.h:85:25: note: 'u_short' declared here
typedef unsigned short          u_short;
                                ^
In file included from icmp-ping.c:76:
/usr/include/netinet/ip_icmp.h:99:4: error: unknown type name 'n_short'; did you mean 'u_short'?
                        n_short ipm_void;
                        ^
/usr/include/sys/types.h:85:25: note: 'u_short' declared here
typedef unsigned short          u_short;
                                ^
In file included from icmp-ping.c:76:
/usr/include/netinet/ip_icmp.h:100:4: error: unknown type name 'n_short'; did you mean 'u_short'?
                        n_short ipm_nextmtu;
                        ^
/usr/include/sys/types.h:85:25: note: 'u_short' declared here
typedef unsigned short          u_short;
                                ^
In file included from icmp-ping.c:76:
/usr/include/netinet/ip_icmp.h:121:4: error: unknown type name 'n_time'
                        n_time its_otime;
                        ^
/usr/include/netinet/ip_icmp.h:122:4: error: unknown type name 'n_time'
                        n_time its_rtime;
                        ^
/usr/include/netinet/ip_icmp.h:123:4: error: unknown type name 'n_time'
                        n_time its_ttime;
                        ^
/usr/include/netinet/ip_icmp.h:126:14: error: field has incomplete type 'struct ip'
                        struct ip idi_ip;
                                  ^
/usr/include/netinet/ip_icmp.h:126:11: note: forward declaration of 'struct ip'
                        struct ip idi_ip;
                               ^
icmp-ping.c:227:44: error: incomplete definition of type 'struct iphdr'
                                pkt = (struct icmp *) (packet1 + (iphdr->ihl << 2));    /* skip ip hdr */
                                                                  ~~~~~^
icmp-ping.c:225:12: note: forward declaration of 'struct iphdr'
                                struct iphdr *iphdr =
                                       ^
icmp-ping.c:231:33: error: use of undeclared identifier 'ICMP_DEST_UNREACH'
                                        else if (pkt->icmp_type == ICMP_DEST_UNREACH)
                                                                   ^
icmp-ping.c:297:23: error: use of undeclared identifier 'SOL_RAW'
        setsockopt(pingsock, SOL_RAW, IPV6_CHECKSUM,
                             ^
icmp-ping.c:337:34: error: use of undeclared identifier 'ICMP_DEST_UNREACH'
                                        else if (pkt->icmp6_type == ICMP_DEST_UNREACH)
                                                                    ^
12 errors generated.
make[3]: *** [icmp-ping.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

/Per

-----Original Message-----
From: Nikos Mavrogiannopoulos [mailto:n.mavrogiannopoulos at gmail.com] On Behalf Of Nikos Mavrogiannopoulos
Sent: den 7 december 2013 17:49
To: Per Juborg
Cc: openconnect-devel at lists.infradead.org
Subject: Re: Error building ocserv 0.2.2

On Fri, 2013-12-06 at 21:59 +0100, Per Juborg wrote:
> Hi,
> 
> That helped, but not all the way :(
> 
> Look at this:
> make
> make  all-recursive
> Making all in gl
> make  all-recursive
> make[4]: Nothing to be done for `all-am'.
> Making all in src
> Making all in pcl
> make[3]: Nothing to be done for `all'.
>   CC       worker-vpn.o
> In file included from worker-vpn.c:35:
> /usr/include/net/if.h:306:19: error: field has incomplete type 'struct sockaddr'
>                 struct  sockaddr ifru_addr;
>                                  ^
> /usr/include/net/if.h:306:10: note: forward declaration of 'struct sockaddr'

No idea what is that. It looks like an issue in this system's headers.
Could you try editing worker-vpn.c and moving the "include net/if.h" at the end of the include list?

regards,
Nikos




More information about the openconnect-devel mailing list