Skip to content

Commit

Permalink
Some BSD systems don't have/define the setxattr flags.
Browse files Browse the repository at this point in the history
  • Loading branch information
Castaglia committed Apr 14, 2016
1 parent 7fd3d16 commit 546b327
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/fsio.c
Expand Up @@ -905,14 +905,18 @@ static int get_setxattr_flags(int fsio_flags) {
*/

if (fsio_flags & PR_FSIO_XATTR_FL_CREATE) {
#if defined(XATTR_CREATE)
xattr_flags = XATTR_CREATE;
#endif /* XATTR_CREATE */

if (fsio_flags & PR_FSIO_XATTR_FL_REPLACE) {
xattr_flags = 0;
}

} else if (fsio_flags & PR_FSIO_XATTR_FL_REPLACE) {
#if defined(XATTR_REPLACE)
xattr_flags = XATTR_REPLACE;
#endif /* XATTR_REPLACE */
}

return xattr_flags;
Expand Down

0 comments on commit 546b327

Please sign in to comment.