From 0a34dda0be21a772c82db9154bca29f71876fcb2 Mon Sep 17 00:00:00 2001 From: Marco van Wieringen Date: Fri, 9 Oct 2009 11:00:04 +0200 Subject: [PATCH] Add support when extattr_get_file is supported but extattr_get_link is not. --- bacula/src/filed/xattr.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bacula/src/filed/xattr.c b/bacula/src/filed/xattr.c index 049150a837..bc750a9e00 100644 --- a/bacula/src/filed/xattr.c +++ b/bacula/src/filed/xattr.c @@ -591,6 +591,9 @@ static bxattr_exit_code (*os_parse_xattr_streams)(JCR *jcr, int stream) = linux_ #if !defined(HAVE_EXTATTR_GET_LINK) || \ !defined(HAVE_EXTATTR_SET_LINK) || \ !defined(HAVE_EXTATTR_LIST_LINK) || \ + !defined(HAVE_EXTATTR_GET_FILE) || \ + !defined(HAVE_EXTATTR_SET_FILE) || \ + !defined(HAVE_EXTATTR_LIST_FILE) || \ !defined(HAVE_EXTATTR_NAMESPACE_TO_STRING) || \ !defined(HAVE_EXTATTR_STRING_TO_NAMESPACE) #error "Missing full support for the extattr functions." @@ -606,6 +609,16 @@ static bxattr_exit_code (*os_parse_xattr_streams)(JCR *jcr, int stream) = linux_ #include #endif +#if !defined(HAVE_EXTATTR_GET_LINK) && defined(HAVE_EXTATTR_GET_FILE) +#define extattr_get_link extattr_get_file +#endif +#if !defined(HAVE_EXTATTR_SET_LINK) && defined(HAVE_EXTATTR_SET_FILE) +#define extattr_set_link extattr_set_file +#endif +#if !defined(HAVE_EXTATTR_LIST_LINK) && defined(HAVE_EXTATTR_LIST_FILE) +#define extattr_list_link extattr_list_file +#endif + #if defined(HAVE_FREEBSD_OS) static int os_default_xattr_streams[1] = { STREAM_XATTR_FREEBSD }; static int os_default_xattr_namespaces[2] = { EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM }; -- 2.39.5