[collectd] dns plugin patch

Sebastian Harl sh at tokkee.org
Tue Feb 16 23:28:26 CET 2010


Hi Amit,

On Mon, Feb 15, 2010 at 07:20:26PM +0530, Amit Gupta wrote:
> On Wed, Feb 10, 2010 at 7:04 PM, Florian Forster <octo at verplant.org> wrote:
> > On Wed, Feb 10, 2010 at 05:13:22PM +0530, Amit Gupta wrote:
> > > - struct ip6_ext is defined in netinet/ip_compat.h for Solaris
> > >   10/OpenSolaris and thus needs to be included in utils_dns.c.
> >
> > > +#define SOLARIS2 10
> >
> > What does this define do? Can you document that in the code so the
> > casual reader knows what's going on?
> >
> This is needed by ip_compat.h on solaris to include the right structures and
> include files for a particular version of solaris. I am thinking of moving
> this define to the config.h.in and its value will be the solaris version
> (extracted from $host_os)

Sounds good to me. Also, imho, this should be defined on Solaris only,
i.e. if KERNEL_SOLARIS is defined.

> > > +#include <netinet/ip_compat.h>
> >
> > That file isn't available under Debian Linux. Could you find out if
> > that file needs to be included before / after some other file (there are
> > such limitations under BSD for other netinet/*.h files) and add an
> > appropriate check to the configure script?
> >
> I am not sure about this. I will try to figure out.
> 
> > >  # include <netinet/in_systm.h>
> >
> > It's probably a good idea to base the check for <netinet/ip_compat.h> on
> > the check for <netinet/in_systm.h>.
> >
> Does including the ip_compat.h under "#if KERNEL_SOLARIS" makes sense given
> that this is a solaris specific fix?

Makes sense to me.

Cheers,
Sebastian

-- 
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20100216/2e715efe/attachment.pgp 


More information about the collectd mailing list