Error building ocserv 0.2.2

Per Juborg per at juborg.nu
Sun Dec 8 18:02:20 EST 2013


Hi,

The story continues,

I added the include, I also had to add netinet/ip.h 

The this shows up:
  CC       icmp-ping.o
icmp-ping.c:229:44: error: incomplete definition of type 'struct iphdr'
                                pkt = (struct icmp *) (packet1 + (iphdr->ihl << 2));    /* skip ip hdr */
                                                                  ~~~~~^
icmp-ping.c:227:12: note: forward declaration of 'struct iphdr'
                                struct iphdr *iphdr =
                                       ^
icmp-ping.c:233:33: error: use of undeclared identifier 'ICMP_DEST_UNREACH'
                                        else if (pkt->icmp_type == ICMP_DEST_UNREACH)
                                                                   ^
icmp-ping.c:299:23: error: use of undeclared identifier 'SOL_RAW'
        setsockopt(pingsock, SOL_RAW, IPV6_CHECKSUM,
                             ^
icmp-ping.c:339:34: error: use of undeclared identifier 'ICMP_DEST_UNREACH'
                                        else if (pkt->icmp6_type == ICMP_DEST_UNREACH)
                                                                    ^
4 errors generated.


/Per

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

On Sun, 2013-12-08 at 00:53 +0100, Per Juborg wrote:
> 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;

Try adding:
#include <netinet/in_systm.h>
before ip_icmp.h.

regards,
Nikos




More information about the openconnect-devel mailing list