Hi,
PK_PKTINFO with a quick search seems to be implemented in NetBSD (turns
up on my system, never ran into this issue) and FreeBSD.
OpenBSD had discussions in 2001, and fast-forward to 2016 it is not
implemented according to the Changelog of their usr/sbin/unbound:
https://github.com/openbsd/src/blob/master/usr.sbin/unbound/doc/Changelog#L4522
Maybe this also holds a solution on how to solve this for gnunet.
On 4/1/22 09:05, Mikhail wrote:
On Thu, Mar 31, 2022 at 06:58:55PM +0000, Schanzenbach, Martin wrote:
Hi Mikhail,
I just pushed some portability fixes to git master.
I tried in a VM (with gcc, however) and it builds for me now on openbsd.
Can you try again?
It seems to me as if you are missing something in your toolchain.
Maybe libtool? Can you check that you have installed all dependencies?
Yes, latest git started to build fine (clang 13), no 'srcdir' configure
hack is needed, but it failed to compile because of IP_PKTINFO being not
implemented.
I'm not sure what 'dhtu' module is doing, googling gives no answer - is
it possible to disable it?
Making all in dhtu
CC testing_dhtu_cmd_send.lo
CCLD libgnunettestingdhtu.la
CC plugin_dhtu_gnunet.lo
CCLD libgnunet_plugin_dhtu_gnunet.la
CC plugin_dhtu_ip.lo
plugin_dhtu_ip.c:857:37: error: use of undeclared identifier 'IP_PKTINFO'
(cmsg->cmsg_type == IP_PKTINFO),
^
plugin_dhtu_ip.c:860:30: error: use of undeclared identifier 'IP_PKTINFO'
(cmsg->cmsg_type == IP_PKTINFO) )
^
plugin_dhtu_ip.c:862:21: error: invalid application of 'sizeof' to an
incomplete type 'struct in_pktinfo'
if (CMSG_LEN (sizeof (struct in_pktinfo)) ==
^ ~~~~~~~~~~~~~~~~~~~
/usr/include/sys/socket.h:546:58: note: expanded from macro 'CMSG_LEN'
#define CMSG_LEN(len) (_ALIGN(sizeof(struct cmsghdr)) + (len))
^~~
plugin_dhtu_ip.c:862:36: note: forward declaration of 'struct in_pktinfo'
if (CMSG_LEN (sizeof (struct in_pktinfo)) ==
^
plugin_dhtu_ip.c:865:27: error: variable has incomplete type 'struct in_pktinfo'
struct in_pktinfo pi;
^
plugin_dhtu_ip.c:862:36: note: forward declaration of 'struct in_pktinfo'
if (CMSG_LEN (sizeof (struct in_pktinfo)) ==
^
plugin_dhtu_ip.c:1033:23: error: use of undeclared identifier 'IP_PKTINFO'
IP_PKTINFO,
^
5 errors generated.
*** Error 1 in src/dhtu (Makefile:896 'plugin_dhtu_ip.lo': @echo " CC "
plugin_dhtu_ip.lo;/bin/sh ../../libtool --silent --tag=CC -...)
*** Error 1 in src (Makefile:569 'all-recursive': @fail=; if (target_option=k; case
${target_option-} in ?) ;; *) echo "am__make_running_...)
*** Error 1 in . (Makefile:651 'all-recursive': @fail=; if (target_option=k; case
${target_option-} in ?) ;; *) echo "am__make_running_wi...)
*** Error 2 in /home/misha/work/gnunet (Makefile:516 'all')