Error compile policykit-0.9 (FreeBSD 7-STABLE)

Pascal Hofstee caelian at gmail.com
Thu Jul 24 09:12:08 UTC 2008


On Thu, 24 Jul 2008 10:23:29 +0300
"Andrei V. Lavreniyuk" <andy.lavr at reactor-xg.kiev.ua> wrote:

> # make
> ===>  Building for policykit-0.9
[snip]
> kit-string.c:141: error: redefinition of 'strndup'
> kit-string.c:119: error: previous definition of 'strndup' was here
> gmake[3]: *** [kit-string.lo] Ошибка 1 gmake[3]: Leaving directory 
> `/usr/ports/sysutils/policykit/work/PolicyKit-0.9/src/kit'
[snip]

A quick look at src/kit/kit-string.c shows that the file simply
includes two definitions for an strndup function both masked by an
identical #ifndef HAVE_STRNDUP #endif clause. This at least explains
why the problem doesn't happen on Linux systems (which have an
strndup implmentation) and hence why it snuck into the release-tarball
in the first place.

The obvious solution would be to simply disable one of the two strndup
implementations and from my understanding of the code the 2nd
implementation feels the more proper one because of it's explicit
checking for potential null-termination before trying to use strlen().

I am sure the FreeBSD-gnome team will analyse this issue promptly and
react accordingly soon.

-- 
  Pascal Hofstee


More information about the freebsd-gnome mailing list