Re: Bug#531950: attr: FTBFS on GNU/kFreeBSD

Aurelien Jarno
2009-06-14T16:35:09Z

On Tue, Jun 09, 2009 at 08:10:42AM -0400, Christoph Hellwig wrote:
> On Tue, Jun 09, 2009 at 01:35:58PM +0200, Petr Salinger wrote:
> > The problem is that there is no ENODATA errno value defined
> > on GNU/kFreeBSD. The errno values are determined by kernel,
> > they are the same as on plain FreeBSD, used libc
> > implementation does not change it.
> >
> > Another possibility is to use patch bellow.
> > Does it looks acceptable for you ?
>
> This one looks better to me, except that I would really make this
> an explicit #ifdef __linux__. The lack of a proper ENOATTR is
> a Linux specific quirck and not related to the presence of
> non-standard ENODATA. Maybe also add a little comment why
> we're doing this so people don't get confused by it.
>
> Btw, how does libattr actually work for you on FreeBSD? Last time
> I checked FreeBSD had slightly different xattr system calls that (just
> like IRIX) used an integer namespace value instead of the string prefix
> in Linux.
>

When not on Linux, libattr uses the GNU libc functions instead of the
system calls. The GNU libc then translates that into FreeBSD syscalls
including the integer namespace value.

--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net