Date: Thu, 24 Jul 2008 10:45:48 +0200 From: Pascal Hofstee <caelian@gmail.com> To: freebsd-gnome@freebsd.org Cc: andy.lavr@gmail.com Subject: Re: Error compile policykit-0.9 (FreeBSD 7-STABLE) Message-ID: <20080724104548.772851e0@nebuchadnezzar> In-Reply-To: <48882DF1.1080806@reactor-xg.kiev.ua> References: <48882DF1.1080806@reactor-xg.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 24 Jul 2008 10:23:29 +0300 "Andrei V. Lavreniyuk" <andy.lavr@reactor-xg.kiev.ua> wrote: > # make > =3D=3D=3D> 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] =D0=9E=D1=88=D0=B8=D0=B1=D0=BA=D0=B0 1 gmak= e[3]: Leaving directory=20 > `/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. --=20 Pascal Hofstee
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080724104548.772851e0>