[collectd] dns plugin patch

Amit Gupta amit.gupta221 at gmail.com
Wed Feb 10 12:43:22 CET 2010


I am trying to build collectd (4.8.1) on OpenSolaris but it fails to build
due to the following error:

"utils_dns.c", line 319: warning: statement not reached
"utils_dns.c", line 434: syntax error before or at: .
"utils_dns.c", line 435: invalid type combination
"utils_dns.c", line 443: improper member use: S_addr
"utils_dns.c", line 443: assignment type mismatch:
        unsigned int "=" struct in6_addr {union  {..} _S6_un}
"utils_dns.c", line 447: improper member use: S_addr
"utils_dns.c", line 447: warning: argument #1 is incompatible with
prototype:
        prototype: pointer to const struct in6_addr {union  {..} _S6_un} :
"utils_dns.c", line 197
        argument : pointer to unsigned int
"utils_dns.c", line 460: incomplete struct/union/enum ip6_ext: ext_hdr
"utils_dns.c", line 472: undefined struct/union member: ip6e_nxt
"utils_dns.c", line 473: undefined struct/union member: ip6e_len
"utils_dns.c", line 504: syntax error before or at: .
"utils_dns.c", line 505: invalid type combination
"utils_dns.c", line 510: improper member use: S_addr
"utils_dns.c", line 510: warning: argument #1 is incompatible with
prototype:
        prototype: pointer to struct in6_addr {union  {..} _S6_un} :
"utils_dns.c", line 259
        argument : pointer to unsigned int
"utils_dns.c", line 512: improper member use: S_addr
"utils_dns.c", line 512: warning: argument #1 is incompatible with
prototype:
        prototype: pointer to const struct in6_addr {union  {..} _S6_un} :
"utils_dns.c", line 197
        argument : pointer to unsigned int
"utils_dns.c", line 516: warning: pointer to void or function used in
arithmetic
"utils_dns.c", line 821: warning: statement not reached
"utils_dns.c", line 892: warning: statement not reached

There seems to be two issues:
- 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.
- struct ip6_ext is defined in netinet/ip_compat.h for Solaris
10/OpenSolaris and thus needs to be included in utils_dns.c.

Do find a patch attached and let me know if the fix looks okay.

Regards
Amit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.verplant.org/pipermail/collectd/attachments/20100210/8244dd69/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: collectd-4.8.1-mine-dns.patch
Type: text/x-patch
Size: 1561 bytes
Desc: not available
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20100210/8244dd69/attachment.bin 


More information about the collectd mailing list