-
Type:
Problem report
-
Resolution: Unresolved
-
Priority:
Major
-
Affects Version/s: 7.0.21
-
Component/s: Agent (G)
-
Environment:ia64-hp-hpux11.23
-
Sprint candidates
During compilation the following error appear (on IA64 only, on RISC everything is fine):
/usr/local/bin/gcc -std=gnu99 -DHAVE_CONFIG_H -I../../../../include/common -I../../../../include -I../../../../src/zabbix_agent -D_XOPEN_SOURCE=600 -D_HPUX_SOURCE -I/usr/local/pcre/include -MT libspecsysinfo_a-net.o -MD -MP -MF .deps/libspecsysinfo_a-net.Tpo -c -o libspecsysinfo_a-net.o `test -f 'net.c' || echo './'`net.c
net.c: In function 'get_if_names':
net.c:63: error: storage size of 'ifc' isn't known
net.c:65: error: storage size of 'lifc' isn't known
net.c:74: error: invalid application of 'sizeof' to incomplete type 'struct ifconf'
net.c:85: error: invalid application of 'sizeof' to incomplete type 'struct ifconf'
net.c:92: error: dereferencing pointer to incomplete type
net.c:97: error: dereferencing pointer to incomplete type
net.c:103: error: increment of pointer to unknown structure
net.c:103: error: arithmetic on pointer to an incomplete type
net.c:123: error: invalid application of 'sizeof' to incomplete type 'struct if_laddrreq'
net.c:127: error: invalid application of 'sizeof' to incomplete type 'struct if_laddrconf'
net.c:131: error: dereferencing pointer to incomplete type
net.c:131: error: increment of pointer to unknown structure
net.c:131: error: arithmetic on pointer to an incomplete type
net.c:133: error: dereferencing pointer to incomplete type
net.c:138: error: dereferencing pointer to incomplete type
configuration:
./configure --enable-agent --sysconfdir=/etc/zabbix --with-iconv=/usr/local/libiconv --with-libpcre=/usr/local/pcre
the fix is:
diff --git a/src/libs/zbxsysinfo/hpux/net.c b/src/libs/zbxsysinfo/hpux/net.c index 2a85b955501..ca259629aba 100644 --- a/src/libs/zbxsysinfo/hpux/net.c +++ b/src/libs/zbxsysinfo/hpux/net.c @@ -24,6 +24,12 @@ #include <sys/dlpi_ext.h> #include <sys/mib.h> +#if HPUX_VERSION < 1131 +# define _NET_NETMP_INCLUDED 1 +# include <net/if.h> +# include <net/if6.h> +#endif + static char buf_ctl[1024]; /* Low Level Discovery needs a way to get the list of network interfaces available */