]> git.sur5r.net Git - bacula/bacula/commitdiff
Add support when extattr_get_file is supported but extattr_get_link is not.
authorMarco van Wieringen <mvw@planets.elm.net>
Fri, 9 Oct 2009 09:00:04 +0000 (11:00 +0200)
committerMarco van Wieringen <mvw@planets.elm.net>
Fri, 9 Oct 2009 09:00:04 +0000 (11:00 +0200)
bacula/src/filed/xattr.c

index 049150a8373220548d629d49b26008924e056776..bc750a9e009f1bc060895b8938c3ca4146601237 100644 (file)
@@ -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 <libutil.h>
 #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 };