From ece0c73d3c4bcef068f6b3f0e34a0c8a597e4509 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Sat, 13 Sep 2025 03:22:44 +0800 Subject: [PATCH 6/6] Fix getxattr for macOS --- aria2t.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git aria2t.c aria2t.c index 2d80eb4..100ef51 100644 --- aria2t.c +++ aria2t.c @@ -867,11 +867,19 @@ update_download_tags(Download *d) char pathbuf[PATH_MAX]; snprintf(pathbuf, sizeof pathbuf, "%s/%s", d->dir, d->name); - size = getxattr(pathbuf, tags_xattr, tags, sizeof tags - 1); + size = getxattr(pathbuf, tags_xattr, tags, sizeof tags - 1 + #ifdef __APPLE__ + , 0, 0 + #endif + ); } if (size < 0 && 0 < d->num_files && d->files[0].path) - size = getxattr(d->files[0].path, tags_xattr, tags, sizeof tags - 1); + size = getxattr(d->files[0].path, tags_xattr, tags, sizeof tags - 1 + #ifdef __APPLE__ + , 0, 0 + #endif + ); free(d->tags); d->tags = 0 < size ? malloc(size + 1 /* NUL */) : NULL;