Error building ocserv 0.2.3 from git
Per Juborg
per at juborg.nu
Tue Dec 10 16:03:55 EST 2013
Hi,
I don't really remember what I've tried, did a git pull a few minutes ago:
This is my result:
CC icmp-ping.o
In file included from icmp-ping.c:77:
/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:232:40: error: use of undeclared identifier 'packet'
pkt = (struct icmp *) (packet1 + ((packet[0] & 0x0f) << 2)); /* ski...
^
icmp-ping.c:237:33: error: use of undeclared identifier 'ICMP_DEST_UNREACH'
else if (pkt->icmp_type == ICMP_DEST_UNREACH)
^
icmp-ping.c:303:23: error: use of undeclared identifier 'SOL_RAW'
setsockopt(pingsock, SOL_RAW, IPV6_CHECKSUM,
^
icmp-ping.c:343:34: error: use of undeclared identifier 'ICMP_DEST_UNREACH'
else if (pkt->icmp6_type == ICMP_DEST_UNREACH)
^
5 errors generated.
My changes:
git diff
diff --git a/config.h.in b/config.h.in
index cf98738..451929f 100644
--- a/config.h.in
+++ b/config.h.in
@@ -945,9 +945,6 @@
/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */
#undef MAP_ANONYMOUS
-/* Define to 1 if your C compiler doesn't accept -c and -o together. */
-#undef NO_MINUS_C_MINUS_O
-
/* Define this if optional arguments are disallowed */
#undef NO_OPTIONAL_OPT_ARGS
diff --git a/src/icmp-ping.c b/src/icmp-ping.c
index a7326f6..4edf03d 100644
--- a/src/icmp-ping.c
+++ b/src/icmp-ping.c
@@ -73,9 +73,7 @@
#include <config.h>
#include <main.h>
#include <net/if.h>
-#ifdef HAVE_NETINIT_IN_SYSTM_H
-# include <netinet/in_systm.h>
-#endif
+#include <netinet/in_systm.h>
#include <netinet/ip_icmp.h>
#include <netinet/ip.h>
#include <netinet/icmp6.h>
diff --git a/src/worker-tun.c b/src/worker-tun.c
index 91a3331..583f52c 100644
--- a/src/worker-tun.c
+++ b/src/worker-tun.c
@@ -32,11 +32,11 @@
#include <fcntl.h>
#include <unistd.h>
#include <limits.h>
-#include <net/if.h>
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
+#include <net/if.h>
#include <arpa/inet.h>
#include <signal.h>
#include <time.h>
/Per
-----Original Message-----
From: Nikos Mavrogiannopoulos [mailto:n.mavrogiannopoulos at gmail.com] On Behalf Of Nikos Mavrogiannopoulos
Sent: den 9 december 2013 22:17
To: Per Juborg
Cc: openconnect-devel at lists.infradead.org
Subject: Re: Error building ocserv 0.2.2
On Mon, 2013-12-09 at 21:41 +0100, Per Juborg wrote:
> 1 warning generated.
> CC main-auth.o
> CC worker-vpn.o
> worker-vpn.c:996:46: error: use of undeclared identifier 'SO_PRIORITY'
> ret = setsockopt( ws->conn_fd, SOL_SOCKET, SO_PRIORITY, &l, sizeof(l));
> ^
> worker-vpn.c:1055:46: error: use of undeclared identifier 'SO_PRIORITY'
> ret = setsockopt( ws->udp_fd, SOL_SOCKET,
> SO_PRIORITY, &l, sizeof(l));
Hello Per,
I've moved that to conditional. However, is there any way to set priority (for IP or just internally in the sockets) in that system?
regards,
Nikos
More information about the openconnect-devel
mailing list