Skip to content

Commit

Permalink
[core] use different getxattr() prototype on MacOS
Browse files Browse the repository at this point in the history
(thx sevan)

x-ref:
  mistydemeo/tigerbrew#917
  • Loading branch information
gstrauss committed Aug 12, 2023
1 parent a466965 commit b9ec84f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/stat_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -841,8 +841,13 @@ static int stat_cache_attr_get(const char *name) {
#if defined(HAVE_XATTR)
#if defined(HAVE_SYS_XATTR_H)
ssize_t attrlen;
#if defined(__APPLE__) && defined(__MACH__)
if (0 < (attrlen = getxattr(name, attrname,
attrval, sizeof(attrval)-1, 0, 0)))
#else
if (0 < (attrlen = getxattr(name, attrname,
attrval, sizeof(attrval)-1)))
#endif
#else
int attrlen = sizeof(attrval)-1;
if (0 == attr_get(name, attrname, attrval, &attrlen, 0))
Expand Down

0 comments on commit b9ec84f

Please sign in to comment.