I am trying to build collectd (4.8.1) on OpenSolaris but it fails to build due to the following error:<br><br>"utils_dns.c", line 319: warning: statement not reached<br>"utils_dns.c", line 434: syntax error before or at: .<br>
"utils_dns.c", line 435: invalid type combination<br>"utils_dns.c", line 443: improper member use: S_addr<br>"utils_dns.c", line 443: assignment type mismatch:<br> unsigned int "=" struct in6_addr {union {..} _S6_un}<br>
"utils_dns.c", line 447: improper member use: S_addr<br>"utils_dns.c", line 447: warning: argument #1 is incompatible with prototype:<br> prototype: pointer to const struct in6_addr {union {..} _S6_un} : "utils_dns.c", line 197<br>
argument : pointer to unsigned int<br>"utils_dns.c", line 460: incomplete struct/union/enum ip6_ext: ext_hdr<br>"utils_dns.c", line 472: undefined struct/union member: ip6e_nxt<br>"utils_dns.c", line 473: undefined struct/union member: ip6e_len<br>
"utils_dns.c", line 504: syntax error before or at: .<br>"utils_dns.c", line 505: invalid type combination<br>"utils_dns.c", line 510: improper member use: S_addr<br>"utils_dns.c", line 510: warning: argument #1 is incompatible with prototype:<br>
prototype: pointer to struct in6_addr {union {..} _S6_un} : "utils_dns.c", line 259<br> argument : pointer to unsigned int<br>"utils_dns.c", line 512: improper member use: S_addr<br>"utils_dns.c", line 512: warning: argument #1 is incompatible with prototype:<br>
prototype: pointer to const struct in6_addr {union {..} _S6_un} : "utils_dns.c", line 197<br> argument : pointer to unsigned int<br>"utils_dns.c", line 516: warning: pointer to void or function used in arithmetic<br>
"utils_dns.c", line 821: warning: statement not reached<br>"utils_dns.c", line 892: warning: statement not reached<br><br>There seems to be two issues:<br>- S_addr member already exists in netinet/in.h on Solaris/OpenSolaris and thus changing the variable name in utils_dns.c will fix this issue.<br>
- struct ip6_ext is defined in netinet/ip_compat.h for Solaris 10/OpenSolaris and thus needs to be included in utils_dns.c.<br><br>Do find a patch attached and let me know if the fix looks okay.<br><br>Regards<br>Amit<br>