[collectd] collectd-4.x on OpenBSD build problem

Florian Forster octo at verplant.org
Sun Jul 1 10:16:41 CEST 2007

Hi Eric,

On Mon, Jun 25, 2007 at 01:11:05PM +0200, eric fauser wrote:
> if u like, i can give you an login to the build host running on
> openbsd4.1

thanks for the login :) I was able to resolve almost all problems:

>  > > utils_dns.c:700: error: `ns_t_a' undeclared (first use in this
>  > > function)
> it looks like the same problem as above; openbsd does not have `enum 
> ns_type' in namser.h
> it has an old structure like `T_foo` and only a few return_codes (rcode_str)

Apparently the <arpa/nameser.h> file is somehow connected with BIND.
There's a define that tells you about the `interface' that's implemented
in the header file. On my workstation that's
  #define __NAMESER 19991006
which is accompanied by arpa/nameser_compat.h, which defines the
``(DEAD) interface version stamp.''
  #define __BIND 19950621

On your OpenBSD 4.1 box the version is defined as
  #define __BIND 19960801

By the way: The version of Bind is 9.3.4 on both hosts, so this isn't

Based on these versions I've written a version of src/utils_dns.c which
compiles nicely on both platforms and should be portable.

> exec.c:119: warning: implicit declaration of function `getpwnam_r'

Very weird: There's `getgrgid_r' and `getgrnam_r', but no `getpwuid_r'
nor `getpwnam_r'. And it's not only missing in <pwd.h> but the symbol
isn't exported by `/usr/lib/libc.so.40.3'.. I have no clue what the
OpenBSD guys where thinking when deciding to leave out a function that's
required by POSIX.1-2001.

Anyway, I've implemented an own version which is built when the system
doesn't provide a thread safe function itself.

I've also fixed the hddtemp, mbmon and ntpd plug-ins which used
`AI_ADDRCONFIG' without checking if it was defined.

I currently have a version that builds with the exception of the perl
plug-in. I've provided debug output to Sebastian, hopefully he can see
what the problem is.

Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20070701/8c5e6c7e/attachment.pgp 

More information about the collectd mailing list