Patch for compiling ocserv 0.11.0 on FreeBSD. Tested on FreeBSD 10.2-RELEASE diff -crNu ocserv-0.11.0/src/ctl.pb-c.h ocserv-0.11.0.new/src/ctl.pb-c.h --- ocserv-0.11.0/src/ctl.pb-c.h 2016-01-18 16:08:41.000000000 +0800 +++ ocserv-0.11.0.new/src/ctl.pb-c.h 2016-02-20 23:03:46.117722025 +0800 @@ -4,7 +4,7 @@ #ifndef PROTOBUF_C_ctl_2eproto__INCLUDED #define PROTOBUF_C_ctl_2eproto__INCLUDED -#include <protobuf-c/protobuf-c.h> +#include <protobuf/protobuf-c/protobuf-c.h> PROTOBUF_C__BEGIN_DECLS diff -crNu ocserv-0.11.0/src/ipc.pb-c.h ocserv-0.11.0.new/src/ipc.pb-c.h --- ocserv-0.11.0/src/ipc.pb-c.h 2016-01-18 18:53:24.000000000 +0800 +++ ocserv-0.11.0.new/src/ipc.pb-c.h 2016-02-20 23:03:41.554722246 +0800 @@ -4,7 +4,7 @@ #ifndef PROTOBUF_C_ipc_2eproto__INCLUDED #define PROTOBUF_C_ipc_2eproto__INCLUDED -#include <protobuf-c/protobuf-c.h> +#include <protobuf/protobuf-c/protobuf-c.h> PROTOBUF_C__BEGIN_DECLS diff -crNu ocserv-0.11.0/src/occtl/unix.c ocserv-0.11.0.new/src/occtl/unix.c --- ocserv-0.11.0/src/occtl/unix.c 2016-01-28 20:53:21.000000000 +0800 +++ ocserv-0.11.0.new/src/occtl/unix.c 2016-02-20 23:12:24.171686171 +0800 @@ -1071,7 +1071,7 @@ char tmpbuf[MAX_TMPSTR_SIZE]; PROTOBUF_ALLOCATOR(pa, ctx); struct termios tio_old, tio_new; - sighandler_t old_sighandler; + SIGHANDLER_T old_sighandler; init_reply(&raw); diff -crNu ocserv-0.11.0/src/tun.c ocserv-0.11.0.new/src/tun.c --- ocserv-0.11.0/src/tun.c 2015-11-23 18:09:12.000000000 +0800 +++ ocserv-0.11.0.new/src/tun.c 2016-02-20 23:27:21.268624856 +0800 @@ -243,7 +243,7 @@ ifr6.ifra_dstaddr.sin6_len = sizeof(struct sockaddr_in6); ifr6.ifra_dstaddr.sin6_family = AF_INET6; - ret = ipv6_prefix_to_mask(&ifr6.ifra_prefixmask.sin6_addr, proc->config.ipv6_prefix); + ret = ipv6_prefix_to_mask(&ifr6.ifra_prefixmask.sin6_addr, proc->config->ipv6_prefix); if (ret == 0) { memset(&ifr6.ifra_prefixmask.sin6_addr, 0xff, sizeof(struct in6_addr)); } diff -crNu ocserv-0.11.0/src/ocpasswd/Makefile.in ocserv-0.11.0.new/src/ocpasswd/Makefile.in --- ocserv-0.11.0/src/ocpasswd/Makefile.in 2016-02-19 17:58:07.000000000 +0800 +++ ocserv-0.11.0.new/src/ocpasswd/Makefile.in 2016-02-20 23:45:57.059548265 +0800 @@ -152,7 +152,7 @@ ocpasswd_OBJECTS = $(am_ocpasswd_OBJECTS) am__DEPENDENCIES_1 = @NEED_LIBOPTS_FALSE at am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) - at NEED_LIBOPTS_TRUE@am__DEPENDENCIES_2 = ../libopts/libopts.a + at NEED_LIBOPTS_TRUE@am__DEPENDENCIES_2 = ../../libopts/libopts.a ocpasswd_DEPENDENCIES = ../../gl/libgnu.a $(am__DEPENDENCIES_2) \ libcmd-ocpasswd.a $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) AM_V_P = $(am__v_P_ at AM_V@) @@ -914,7 +914,7 @@ -I$(builddir) $(LIBTALLOC_CFLAGS) $(LIBOPTS_CFLAGS) @NEED_LIBOPTS_FALSE at NEEDED_LIBOPTS = $(LIBOPTS_LDADD) - at NEED_LIBOPTS_TRUE@NEEDED_LIBOPTS = ../libopts/libopts.a + at NEED_LIBOPTS_TRUE@NEEDED_LIBOPTS = ../../libopts/libopts.a EXTRA_DIST = args.def BUILT_SOURCES = args.c args.h noinst_LIBRARIES = libcmd-ocpasswd.a On Sat, Feb 20, 2016 at 11:08 PM, hshh <hunreal at gmail.com> wrote: > A lot of error while compiling on FreeBSD too. > Such like './../ipc.pb-c.h:7:35: fatal error: protobuf-c/protobuf-c.h: > No such file or directory', './../common/system.h:42:14: note: > expected 'sig_t' but argument is of type 'int''. > > On Sat, Feb 20, 2016 at 9:12 PM, Bj?rn Ketelaars > <bjorn.ketelaars at hydroxide.nl> wrote: >> I'm trying to get ocserv 0.11.0 to compile on OpenBSD. Unfortunately there is >> an error: >> >> cc -DHAVE_CONFIG_H -I. -I.. -I./../gl/ -I./../gl/ -I./ -I./../ -I./../ -I../libopts -I/usr/local/include -I/usr/local/include/p11-kit-1 -I/usr/include -I./common -I./common -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include/liboath -I./http-parser/ -I./pcl/ -I/usr/local/include -O2 -pipe -Wall -Wno-strict-aliasing -MT tun.o -MD -MP -MF $depbase.Tpo -c -o tun.o tun.c &&\ >> mv -f $depbase.Tpo $depbase.Po >> tun.c: In function 'set_ipv6_addr': >> tun.c:246: error: request for member 'ipv6_prefix' in something not a structure or union >> tun.c:223: warning: unused variable 'p' >> tun.c:222: warning: unused variable 'c_netmask_buf' >> tun.c: In function 'open_tun': >> tun.c:480: warning: unused variable 't' >> tun.c:479: warning: unused variable 'ifr' >> Makefile:1366: recipe for target 'tun.o' failed >> gmake[4]: *** [tun.o] Error 1 >> gmake[4]: Leaving directory '/home/code/ports/pobj/ocserv-0.11.0/ocserv-0.11.0/src' >> >> Simple fix: >> >> --- src/tun.c.orig Sat Feb 20 13:08:48 2016 >> +++ src/tun.c Sat Feb 20 13:01:21 2016 >> @@ -243,7 +243,7 @@ int set_ipv6_addr(main_server_st * s, struct proc_st * >> ifr6.ifra_dstaddr.sin6_len = sizeof(struct sockaddr_in6); >> ifr6.ifra_dstaddr.sin6_family = AF_INET6; >> >> - ret = ipv6_prefix_to_mask(&ifr6.ifra_prefixmask.sin6_addr, proc->config.ipv6_prefix); >> + ret = ipv6_prefix_to_mask(&ifr6.ifra_prefixmask.sin6_addr, proc->config->ipv6_prefix); >> if (ret == 0) { >> memset(&ifr6.ifra_prefixmask.sin6_addr, 0xff, sizeof(struct in6_addr)); >> } >> >> -- >> Bj?rn Ketelaars >> GPG key: 0x4F0E5F21 >> >> _______________________________________________ >> openconnect-devel mailing list >> openconnect-devel at lists.infradead.org >> http://lists.infradead.org/mailman/listinfo/openconnect-devel > > > > -- > @hshh -- @hshh