You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running make after autogen.sh and ./configure on OpenBSD 6.4:
make all-recursive
CC libopenconnect_la-gpst.lo
In file included from gpst.c:45:
/usr/include/netinet/ip.h:67: error: field 'ip_src' has incomplete type
/usr/include/netinet/ip.h:67: error: field 'ip_dst' has incomplete type
/usr/include/netinet/ip.h:181: error: field 'ipt_addr' has incomplete type
In file included from gpst.c:46:
/usr/include/netinet/ip_icmp.h:71: error: field 'ih_gwaddr' has incomplete type
Error while executing gcc -DHAVE_CONFIG_H -I. -DLOCALEDIR="/usr/local/share/locale"
-I/usr/local/include -Wall -Wextra -Wno-missing-field-initializers -Wno-sign-compare
-Wno-unused-parameter -Werror=pointer-to-int-cast -Wdeclaration-after-statement
-Werror-implicit-function-declaration -Wformat-nonliteral -Wformat-security -Winit-self
-Wmissing-declarations -Wmissing-include-dirs -Wnested-externs -Wpointer-arith
-Wwrite-strings -I/usr/local/include -I/usr/local/include/p11-kit-1
-I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/include
-I/usr/local/include/p11-kit-1 -I/usr/local/include/pskc -I/usr/local/include
-I/usr/local/include/PCSC -pthread -I/usr/local/include -g -O2
-MT libopenconnect_la-gpst.lo -MD -MP -MF .deps/libopenconnect_la-gpst.Tpo
-c gpst.c -fPIC -DPIC -o .libs/libopenconnect_la-gpst.o
*** Error 1 in . (Makefile:1132 'libopenconnect_la-gpst.lo':
@echo " CC " libopenconnect_la-gpst.lo;/usr/bin/libtool --silent --tag=CC...)
*** Error 1 in /usr/local/src/openconnect-dlenski (Makefile:715 'all')
There is net/openconnect (version 7.08) on OpenBSD Ports which builds successfully without patches.
So it turns out that I'm slightly lying when I say in the README that this version has no dependencies beyond the upstream openconnect. Initiating the ESP connection with a GlobalProtect server requires building IP/ICMP ping packets with a vary speshul custom payload, and some header files are needed for it.
I could build dlenski/openconnect, and run with --protocol gp successfully on FreeBSD 12 though.
MacOS support is thanks to #9, FreeBSD support is thanks to #46, and Windows support (woof) was added thanks to #90.
I'm pretty sure OpenBSD requires the same extra header files as FreeBSD. Does this patch do the trick?
diff --git a/gpst.c b/gpst.c
index a9ef565..81927e5 100644
--- a/gpst.c+++ b/gpst.c@@ -34,14 +34,16 @@
#include <lz4.h>
#endif
-#ifdef __FreeBSD__-#include <sys/types.h>-#include <netinet/in.h>-#endif-
#ifdef _WIN32
#include "win32-ipicmp.h"
#else
+/* The BSDs require these basic headers for netinet/ip.h+ * (Linux and macOS just #include them within netinet/ip.h)+ */+#if defined(__FreeBSD__) || defined(__OpenBSD__)+#include <sys/types.h>+#include <netinet/in.h>+#endif
#include <netinet/ip.h>
#include <netinet/ip_icmp.h>
#endif
Running
make
afterautogen.sh
and./configure
on OpenBSD 6.4:There is net/openconnect (version 7.08) on OpenBSD Ports
which builds successfully without patches.
I could build dlenski/openconnect, and run with
--protocol gp
successfully onFreeBSD 12
though.The text was updated successfully, but these errors were encountered: