diff -Naur acl-2.2.52.orig/configure acl-2.2.52/configure
--- acl-2.2.52.orig/configure	2013-05-19 05:51:16.000000000 +0000
+++ acl-2.2.52/configure	2015-09-26 19:45:27.877630802 +0000
@@ -12416,9 +12416,9 @@
     fi
 
 
- for ac_header in attr/xattr.h
+ for ac_header in sys/xattr.h
 do :
-  ac_fn_c_check_header_mongrel "$LINENO" "attr/xattr.h" "ac_cv_header_attr_xattr_h" "$ac_includes_default"
+  ac_fn_c_check_header_mongrel "$LINENO" "sys/xattr.h" "ac_cv_header_attr_xattr_h" "$ac_includes_default"
 if test "x$ac_cv_header_attr_xattr_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_ATTR_XATTR_H 1
@@ -12430,33 +12430,12 @@
 
     if test "$ac_cv_header_attr_xattr_h" != "yes"; then
         echo
-        echo 'FATAL ERROR: attr/xattr.h does not exist.'
+        echo 'FATAL ERROR: sys/xattr.h does not exist.'
         echo 'Install the extended attributes (attr) development package.'
         echo 'Alternatively, run "make install-dev" from the attr source.'
         exit 1
     fi
 
- for ac_header in attr/error_context.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "attr/error_context.h" "ac_cv_header_attr_error_context_h" "$ac_includes_default"
-if test "x$ac_cv_header_attr_error_context_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_ATTR_ERROR_CONTEXT_H 1
-_ACEOF
-
-fi
-
-done
-
-    if test "$ac_cv_header_attr_error_context_h" != "yes"; then
-        echo
-        echo 'FATAL ERROR: attr/error_context.h does not exist.'
-        echo 'Install the extended attributes (attr) development package.'
-        echo 'Alternatively, run "make install-dev" from the attr source.'
-        exit 1
-    fi
-
-
                   enable_lib64="$enable_lib64"
   libdirsuffix=""
   searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
@@ -12477,64 +12456,6 @@
   fi
 
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getxattr in -lattr" >&5
-$as_echo_n "checking for getxattr in -lattr... " >&6; }
-if ${ac_cv_lib_attr_getxattr+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lattr  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char getxattr ();
-int
-main ()
-{
-return getxattr ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_attr_getxattr=yes
-else
-  ac_cv_lib_attr_getxattr=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_getxattr" >&5
-$as_echo "$ac_cv_lib_attr_getxattr" >&6; }
-if test "x$ac_cv_lib_attr_getxattr" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBATTR 1
-_ACEOF
-
-  LIBS="-lattr $LIBS"
-
-else
-
-        echo
-        echo 'FATAL ERROR: could not find a valid Extended Attributes library.'
-        echo 'Install the extended attributes (attr) development package.'
-        echo 'Alternatively, run "make install-lib" from the attr source.'
-        exit 1
-
-fi
-
-    libattr="-lattr"
-    test -f `pwd`/../attr/libattr/libattr.la && \
-        libattr="`pwd`/../attr/libattr/libattr.la"
-
-
  have_zipped_manpages=false
     for d in ${prefix}/share/man ${prefix}/man ; do
         if test -f $d/man1/man.1.gz
diff -Naur acl-2.2.52.orig/libacl/Makefile acl-2.2.52/libacl/Makefile
--- acl-2.2.52.orig/libacl/Makefile	2013-04-30 15:20:43.000000000 +0000
+++ acl-2.2.52/libacl/Makefile	2015-09-26 19:45:43.961630549 +0000
@@ -22,7 +22,7 @@
 include $(TOPDIR)/include/builddefs
 
 LTLIBRARY = libacl.la
-LTLIBS = -lattr $(LIBMISC)
+LTLIBS = $(LIBMISC)
 LTDEPENDENCIES = $(LIBMISC)
 LT_CURRENT = 2
 LT_REVISION = 0
diff -Naur acl-2.2.52.orig/libacl/__acl_extended_file.c acl-2.2.52/libacl/__acl_extended_file.c
--- acl-2.2.52.orig/libacl/__acl_extended_file.c	2013-04-30 15:20:43.000000000 +0000
+++ acl-2.2.52/libacl/__acl_extended_file.c	2015-09-26 19:44:03.461632131 +0000
@@ -19,8 +19,13 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
 
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <unistd.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
 #include "libacl.h"
 
 #include "byteorder.h"
diff -Naur acl-2.2.52.orig/libacl/acl_delete_def_file.c acl-2.2.52/libacl/acl_delete_def_file.c
--- acl-2.2.52.orig/libacl/acl_delete_def_file.c	2013-04-30 15:20:43.000000000 +0000
+++ acl-2.2.52/libacl/acl_delete_def_file.c	2015-09-26 19:44:03.461632131 +0000
@@ -19,12 +19,15 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <sys/types.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
 #include "byteorder.h"
 #include "acl_ea.h"
-#include "config.h"
-
+#include "libobj.h"
 
 /* 23.4.8 */
 int
diff -Naur acl-2.2.52.orig/libacl/acl_extended_fd.c acl-2.2.52/libacl/acl_extended_fd.c
--- acl-2.2.52.orig/libacl/acl_extended_fd.c	2013-04-30 15:20:43.000000000 +0000
+++ acl-2.2.52/libacl/acl_extended_fd.c	2015-09-26 19:44:03.465632131 +0000
@@ -19,8 +19,12 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <unistd.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
 #include "libacl.h"
 
 #include "byteorder.h"
diff -Naur acl-2.2.52.orig/libacl/acl_extended_file.c acl-2.2.52/libacl/acl_extended_file.c
--- acl-2.2.52.orig/libacl/acl_extended_file.c	2013-04-30 15:20:43.000000000 +0000
+++ acl-2.2.52/libacl/acl_extended_file.c	2015-09-26 19:44:03.465632131 +0000
@@ -19,8 +19,12 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <unistd.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
 #include "libacl.h"
 
 #include "__acl_extended_file.h"
diff -Naur acl-2.2.52.orig/libacl/acl_extended_file_nofollow.c acl-2.2.52/libacl/acl_extended_file_nofollow.c
--- acl-2.2.52.orig/libacl/acl_extended_file_nofollow.c	2013-04-30 15:20:43.000000000 +0000
+++ acl-2.2.52/libacl/acl_extended_file_nofollow.c	2015-09-26 19:44:03.465632131 +0000
@@ -19,8 +19,12 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <unistd.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
 #include "libacl.h"
 
 #include "__acl_extended_file.h"
diff -Naur acl-2.2.52.orig/libacl/acl_get_fd.c acl-2.2.52/libacl/acl_get_fd.c
--- acl-2.2.52.orig/libacl/acl_get_fd.c	2013-04-30 15:20:43.000000000 +0000
+++ acl-2.2.52/libacl/acl_get_fd.c	2015-09-26 19:44:03.465632131 +0000
@@ -19,11 +19,15 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
 #include <stdio.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
 #include <acl/libacl.h>
 #include "libacl.h"
 #include "__acl_from_xattr.h"
diff -Naur acl-2.2.52.orig/libacl/acl_get_file.c acl-2.2.52/libacl/acl_get_file.c
--- acl-2.2.52.orig/libacl/acl_get_file.c	2013-04-30 15:20:43.000000000 +0000
+++ acl-2.2.52/libacl/acl_get_file.c	2015-09-26 19:44:03.465632131 +0000
@@ -19,11 +19,15 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
 #include <stdio.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
 #include <acl/libacl.h>
 #include "libacl.h"
 #include "__acl_from_xattr.h"
diff -Naur acl-2.2.52.orig/libacl/acl_set_fd.c acl-2.2.52/libacl/acl_set_fd.c
--- acl-2.2.52.orig/libacl/acl_set_fd.c	2013-04-30 15:20:43.000000000 +0000
+++ acl-2.2.52/libacl/acl_set_fd.c	2015-09-26 19:44:03.465632131 +0000
@@ -19,8 +19,12 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <unistd.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
 #include "libacl.h"
 #include "__acl_to_xattr.h"
 
diff -Naur acl-2.2.52.orig/libacl/acl_set_file.c acl-2.2.52/libacl/acl_set_file.c
--- acl-2.2.52.orig/libacl/acl_set_file.c	2013-04-30 15:20:43.000000000 +0000
+++ acl-2.2.52/libacl/acl_set_file.c	2015-09-26 19:44:03.465632131 +0000
@@ -19,10 +19,14 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
 #include "libacl.h"
 #include "__acl_to_xattr.h"
 
diff -Naur acl-2.2.52.orig/libacl/error_context.h acl-2.2.52/libacl/error_context.h
--- acl-2.2.52.orig/libacl/error_context.h	1970-01-01 00:00:00.000000000 +0000
+++ acl-2.2.52/libacl/error_context.h	2015-09-26 19:44:03.465632131 +0000
@@ -0,0 +1,53 @@
+/*
+  Copyright (C) 2009  Andreas Gruenbacher <address@hidden>
+
+  This program is free software: you can redistribute it and/or modify it
+  under the terms of the GNU Lesser General Public License as published by
+  the Free Software Foundation, either version 2.1 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __ERROR_CONTEXT_T
+#define __ERROR_CONTEXT_T
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct error_context {
+       /* Process an error message */
+       void (*error) (struct error_context *, const char *, ...);
+
+       /* Quote a file name for including in an error message */
+       const char *(*quote) (struct error_context *, const char *);
+
+       /* Free a quoted name */
+       void (*quote_free) (struct error_context *, const char *);
+};
+
+#ifdef ERROR_CONTEXT_MACROS
+# define error(ctx, args...) do { \
+       if ((ctx) && (ctx)->error) \
+               (ctx)->error((ctx), args); \
+       } while(0)
+# define quote(ctx, name) \
+       ( ((ctx) && (ctx)->quote) ? (ctx)->quote((ctx), (name)) : (name) )
+# define quote_free(ctx, name) do { \
+       if ((ctx) && (ctx)->quote_free) \
+               (ctx)->quote_free((ctx), (name)); \
+       } while(0)
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  /* __ERROR_CONTEXT_T */
diff -Naur acl-2.2.52.orig/libacl/libobj.h acl-2.2.52/libacl/libobj.h
--- acl-2.2.52.orig/libacl/libobj.h	2013-04-30 15:20:43.000000000 +0000
+++ acl-2.2.52/libacl/libobj.h	2015-09-26 19:44:03.465632131 +0000
@@ -19,8 +19,11 @@
 #define __LIBOBJ_H
 
 #include <stdlib.h>
+#include <errno.h>
 
-#include "config.h"
+#ifndef ENOATTR
+# define ENOATTR ENODATA        /* No such attribute */
+#endif
 
 /* Mark library internal functions as hidden */
 #if defined(HAVE_VISIBILITY_ATTRIBUTE)
diff -Naur acl-2.2.52.orig/libacl/perm_copy_fd.c acl-2.2.52/libacl/perm_copy_fd.c
--- acl-2.2.52.orig/libacl/perm_copy_fd.c	2013-04-30 15:20:43.000000000 +0000
+++ acl-2.2.52/libacl/perm_copy_fd.c	2015-09-26 19:44:03.465632131 +0000
@@ -17,9 +17,10 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
 
-#if defined (HAVE_CONFIG_H)
+#ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
+
 #if defined(HAVE_LIBACL_LIBACL_H)
 # include "libacl.h"
 #endif
@@ -39,11 +40,7 @@
 #endif
 
 #define ERROR_CONTEXT_MACROS
-#ifdef HAVE_ATTR_ERROR_CONTEXT_H
-#include <attr/error_context.h>
-#else
 #include "error_context.h"
-#endif
 
 #if !defined(ENOTSUP)
 # define ENOTSUP (-1)
diff -Naur acl-2.2.52.orig/libacl/perm_copy_file.c acl-2.2.52/libacl/perm_copy_file.c
--- acl-2.2.52.orig/libacl/perm_copy_file.c	2013-04-30 15:20:43.000000000 +0000
+++ acl-2.2.52/libacl/perm_copy_file.c	2015-09-26 19:44:03.465632131 +0000
@@ -17,9 +17,10 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
 
-#if defined (HAVE_CONFIG_H)
+#ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
+
 #if defined(HAVE_LIBACL_LIBACL_H)
 # include "libacl.h"
 #endif
@@ -39,11 +40,7 @@
 #endif
 
 #define ERROR_CONTEXT_MACROS
-#ifdef HAVE_ATTR_ERROR_CONTEXT_H
-#include <attr/error_context.h>
-#else
 #include "error_context.h"
-#endif
 
 #if !defined(ENOTSUP)
 # define ENOTSUP (-1)
