|
|
|
@ -15,7 +15,9 @@
|
|
|
|
|
#include <unistd.h>
|
|
|
|
|
#include <fcntl.h>
|
|
|
|
|
|
|
|
|
|
#ifdef HAVE_ATTR_ATTRIBUTES_H
|
|
|
|
|
#if defined(HAVE_SYS_XATTR_H)
|
|
|
|
|
# include <sys/xattr.h>
|
|
|
|
|
#elif defined(HAVE_ATTR_ATTRIBUTES_H)
|
|
|
|
|
# include <attr/attributes.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
@ -555,10 +557,16 @@ static const char *attrname = "Content-Type";
|
|
|
|
|
static char attrval[128];
|
|
|
|
|
static buffer attrb = { attrval, 0, 0 };
|
|
|
|
|
|
|
|
|
|
static int stat_cache_attr_get(char *name) {
|
|
|
|
|
static int stat_cache_attr_get(const char *name) {
|
|
|
|
|
#if defined(HAVE_XATTR)
|
|
|
|
|
#if defined(HAVE_SYS_XATTR_H)
|
|
|
|
|
ssize_t attrlen;
|
|
|
|
|
if (0 < (attrlen = getxattr(name, attrname,
|
|
|
|
|
attrval, sizeof(attrval)-1)))
|
|
|
|
|
#else
|
|
|
|
|
int attrlen = sizeof(attrval)-1;
|
|
|
|
|
if (0 == attr_get(name, attrname, attrval, &attrlen, 0))
|
|
|
|
|
#endif
|
|
|
|
|
#elif defined(HAVE_EXTATTR)
|
|
|
|
|
ssize_t attrlen;
|
|
|
|
|
if (0 < (attrlen = extattr_get_file(name, EXTATTR_NAMESPACE_USER, attrname,
|
|
|
|
|