From: Yang Tse Date: Wed, 10 Nov 2010 17:39:44 +0000 (+0100) Subject: xattr: portability fix X-Git-Tag: curl-7_21_3~72 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1df103244401844c40cadcf0a00012736c757483;p=curl xattr: portability fix --- 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++; }