diff options
author | Andreas Gruenbacher <agruen@linbit.com> | 2012-09-17 17:01:01 +0200 |
---|---|---|
committer | Andreas Gruenbacher <agruen@linbit.com> | 2012-09-17 17:04:20 +0200 |
commit | 1ea53aae179f1590a9d255c490b376dae158648e (patch) | |
tree | c215dd465ae86d563f73b3299dd0d04ed2b39429 | |
parent | 20c9d7d5abc41d5a2c6cfed9fe69654ae9a3a4f6 (diff) | |
download | patch-1ea53aae179f1590a9d255c490b376dae158648e.tar.gz |
Disable xattrs if libattr doesn't implement attr_copy_action()
* m4/xattr.m4 (gl_FUNC_XATTR): Only enable USE_XATTR if both attr_copy_file()
and attr_copy_action() are defined.
* src/util.c (copy_attr_check): No fallback needed if attr_copy_action() is not
defined.
-rw-r--r-- | m4/xattr.m4 | 3 | ||||
-rw-r--r-- | src/util.c | 6 |
2 files changed, 2 insertions, 7 deletions
diff --git a/m4/xattr.m4 b/m4/xattr.m4 index 48b08c3..ed26886 100644 --- a/m4/xattr.m4 +++ b/m4/xattr.m4 @@ -30,7 +30,8 @@ AC_DEFUN([gl_FUNC_XATTR], LIB_XATTR=$ac_cv_search_attr_copy_file]) AC_CHECK_FUNCS([attr_copy_file attr_copy_action]) LIBS=$xattr_saved_LIBS - if test $ac_cv_func_attr_copy_file = yes; then + if test $ac_cv_func_attr_copy_file = yes \ + && test $ac_cv_func_attr_copy_action = yes; then use_xattr=yes fi fi @@ -196,8 +196,6 @@ copy_attr_free (struct error_context *ctx, char const *str) { } -#ifdef HAVE_ATTR_COPY_ACTION - static int copy_attr_check (const char *name, struct error_context *ctx) { @@ -205,10 +203,6 @@ copy_attr_check (const char *name, struct error_context *ctx) return action == 0 || action == ATTR_ACTION_PERMISSIONS; } -#else -#define copy_attr_check NULL -#endif - static int copy_attr (char const *src_path, char const *dst_path) { |