Test for USE_XATTR correctly: the configure script defines it to "yes" if libattr is available, or doesn't define it at all if it's not. diff -x config.log -x config.status -ru tmp/coreutils-8.4/src/copy.c work/coreutils-8.4/src/copy.c --- tmp/coreutils-8.4/src/copy.c 2010-01-03 17:06:20.000000000 +0000 +++ work/coreutils-8.4/src/copy.c 2010-01-16 11:26:45.914419566 +0000 @@ -54,7 +54,7 @@ #include "areadlink.h" #include "yesno.h" -#if USE_XATTR +#ifdef USE_XATTR # include # include # include @@ -174,7 +174,7 @@ return err == ENOTSUP || err == ENODATA; } -#if USE_XATTR +#ifdef USE_XATTR static void copy_attr_error (struct error_context *ctx ATTRIBUTE_UNUSED, char const *fmt, ...) diff -x config.log -x config.status -ru tmp/coreutils-8.4/src/cp.c work/coreutils-8.4/src/cp.c --- tmp/coreutils-8.4/src/cp.c 2010-01-04 15:46:06.000000000 +0000 +++ work/coreutils-8.4/src/cp.c 2010-01-16 11:26:51.992419509 +0000 @@ -1141,7 +1141,7 @@ "without an SELinux-enabled kernel")); } -#if !USE_XATTR +#ifndef USE_XATTR if (x.require_preserve_xattr) error (EXIT_FAILURE, 0, _("cannot preserve extended attributes, cp is " "built without xattr support"));