removing _WANT_IFADDR breaks net-snmp

From: Michael Butler <imb_at_protected-networks.net>
Date: Thu, 26 Feb 2015 22:08:40 -0500
The recent changes which served to hide "struct ifaddr" have broken
net-snmp:

imb_at_toshi:/usr/ports/net-mgmt/net-snmp> sudo make
===>  Building for net-snmp-5.7.3_5
making all in /usr/ports/net-mgmt/net-snmp/work/net-snmp-5.7.3/snmplib
making all in /usr/ports/net-mgmt/net-snmp/work/net-snmp-5.7.3/agent
making all in /usr/ports/net-mgmt/net-snmp/work/net-snmp-5.7.3/agent/helpers
making all in
/usr/ports/net-mgmt/net-snmp/work/net-snmp-5.7.3/agent/mibgroup
/bin/sh ../../libtool --mode=compile cc -I../../include -I.
-I../../agent -I../../agent/mibgroup  -I../../snmplib -I/usr/include
-DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -O2 -pipe -march=core2
-I/usr/local/include -I/include -D_WANT_IFADDR -fstack-protector
-fno-strict-aliasing -std=c99 -Ufreebsd11 -Dfreebsd11=freebsd11
-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include
-I/usr/local/lib/perl5/5.18/mach/CORE -c -o mibII/ipv6.lo mibII/ipv6.c
libtool: compile:  cc -I../../include -I. -I../../agent
-I../../agent/mibgroup -I../../snmplib -I/usr/include
-DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -O2 -pipe -march=core2
-I/usr/local/include -I/include -D_WANT_IFADDR -fstack-protector
-fno-strict-aliasing -std=c99 -Ufreebsd11 -Dfreebsd11=freebsd11
-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include
-I/usr/local/lib/perl5/5.18/mach/CORE -c mibII/ipv6.c  -fPIC -DPIC -o
mibII/.libs/ipv6.o
mibII/ipv6.c:806:20: warning: returning 'char *' from a function with
result type 'u_char *' (aka 'unsigned char *') converts between pointers
to integer types with
      different sign [-Wpointer-sign]
            return p;
                   ^
mibII/ipv6.c:848:29: error: variable has incomplete type 'struct ifaddr'
            struct ifaddr   ifaddr;
                            ^
/usr/include/net/if_var.h:89:24: note: forward declaration of 'struct
ifaddr'
TAILQ_HEAD(ifaddrhead, ifaddr); /* instantiation is preserved in the list */
                       ^
/usr/include/sys/queue.h:493:9: note: expanded from macro 'TAILQ_HEAD'
        struct type *tqh_first; /* first element */                     \
               ^
1 warning and 1 error generated.
*** Error code 1


Received on Fri Feb 27 2015 - 02:08:45 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:55 UTC