Building on FreeBSD 6.1

Aron Stansvik elvstone at
Tue Oct 3 15:07:36 PDT 2006

Hello DBus folks!

Today I tried building 0.93 on FreeBSD 6.1 and bumped into two minor
issues. The first is that on FreeBSD dirfd(2) is a macro, and not a
function, and hence will not be found by the AC_CHECK_FUNCS() macro in This results in a compilation error as on my system
dbus-sysdeps-util-unix.c:518 is reached:

#           error "buffer size for readdir_r cannot be determined"

thiago suggested on IRC that AC_TRY_COMPILE should be used to check
for dirfd(2) instead, but I'm an autotools illiterate so I don't quite
know how to go about this (I also saw in autoconf manual that
AC_TRY_COMPILE is deprecated in favor of AC_COMPILE_IFELSE(), which I
guess should be used instead).

The second problem is simpler; FreeBSD needs the -pthread link flag in
order to find the POSIX threads symbols.

These are the two things that are needed to get DBus to compile out of
the box on FreeBSD, so if someone with their fingers deep in the build
system could respond, that would be great.

If access to a FreeBSD system would help, e-mail me privatly and you
can get an account on my machine.

Thanks for your great work on an important piece in the *NIX desktop puzzle.

Best regards,
Aron Stansvik

More information about the dbus mailing list