Making rsync compile under Mac OS X 10.3.9 with extended attributes

Wayne Davison wayned at
Thu Feb 7 22:33:49 GMT 2008

On Thu, Feb 07, 2008 at 10:51:34PM +0100, Vitorio Machado wrote:
> I also noticed that sys_lgetxattr can not be called twice if the buffer 
> size is too small, because there is no offset management. Is this normal? 

The code calls sys_lgetxattr() once with a NULL pointer and a 0 length
to ask for the size.  Then, it calls it with a buffer large enough to
hold the attribute.  So, the best solution would be to make your code
just ask the OS how big an item is when there is no buffer pointer.  If
that is not possible, it should be easy to cache an object in a static
in your function and re-use it for a following call where the name


More information about the rsync mailing list