Allow Solaris sys_llistxattr() to return the list length when size == 0.
[rsync/rsync.git] / lib / sysxattrs.c
index 7845d59..1512518 100644 (file)
@@ -254,6 +254,8 @@ ssize_t sys_llistxattr(const char *path, char *list, size_t size)
                        continue;
 
                if ((ret += len+1) > size) {
+                       if (size == 0)
+                               continue;
                        ret = -1;
                        errno = ERANGE;
                        break;