From: Marco van Wieringen Date: Fri, 9 Oct 2009 09:00:04 +0000 (+0200) Subject: Add support when extattr_get_file is supported but extattr_get_link is not. X-Git-Tag: Release-5.0.0~285^2~1^2~4^2~16 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0a34dda0be21a772c82db9154bca29f71876fcb2;p=bacula%2Fbacula Add support when extattr_get_file is supported but extattr_get_link is not. --- 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 };