diff options
author | Yang Tse <yangsita@gmail.com> | 2010-11-10 18:39:44 +0100 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2010-11-10 18:39:44 +0100 |
commit | 1df103244401844c40cadcf0a00012736c757483 (patch) | |
tree | bc40de574444dfc6d82b61cfa68205808fb71a3a /src | |
parent | b1e4dce671f0ccd684a76706ea8272f216de4e40 (diff) |
xattr: portability fix
Diffstat (limited to 'src')
-rw-r--r-- | src/xattr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/xattr.c b/src/xattr.c index a770405c9..3fc264a7e 100644 --- a/src/xattr.c +++ b/src/xattr.c @@ -55,7 +55,11 @@ int fwrite_xattr(CURL *curl, int fd) char *value = NULL; CURLcode rc = curl_easy_getinfo(curl, mappings[i].info, &value); if ( rc == CURLE_OK && value ) { +#ifdef HAVE_FSETXATTR_6 + err = fsetxattr( fd, mappings[i].attr, value, strlen(value), 0, 0 ); +#elif defined(HAVE_FSETXATTR_5) err = fsetxattr( fd, mappings[i].attr, value, strlen(value), 0 ); +#endif } i++; } |