During my trials to compile Net-SNMP 5.4.2.1 for AIX 6.1 a came across an make error that i resolved by small workaround. I was getting this error:
gcc -I../../include -I. -I../../agent -I../../agent/mibgroup -I../../snmplib -g -O2 -Uaix6 -Daix6=aix6 -c mibII/ip.c -DPIC -o mibII/.libs/ip.o
In file included from /usr/include/sys/corral.h:25,
from /usr/include/libperfstat.h:28,
from mibII/ip.c:37:
/usr/include/netinet/in6_var.h:65: error: array type has incomplete element type
make: 1254-004 The error code from the last command is 1.
Stop.
make: 1254-004 The error code from the last command is 2.
Stop.
make: 1254-004 The error code from the last command is 2.
Stop.
I compared the mentioned in6_var.h and in_var.h files in /usr/include/netinet and this first one had different declaration of some struct. I'm no programmer but i found on google, that it must be called as a pointer and not as a static variable so i changed the definition from this:
extern CONST struct protosw inet6sw[];
to this:
extern CONST struct protosw *inet6sw[];
Now it works but we don't use any network statistics monitoring on AIX servers so i don't know if all will work as it should. The compilation however was successful. If anyone came across this problem and found proper solution, please leave your comments, it will be highly appreciated, thank you.