Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 489170 | Differences between
and this patch

Collapse All | Expand All

(-)a/acinclude.m4 (-5 / +27 lines)
Lines 37-54 AC_DEFUN([TAR_HEADERS_ATTR_XATTR_H], Link Here
37
    [], [with_xattrs=maybe]
37
    [], [with_xattrs=maybe]
38
  )
38
  )
39
39
40
  AC_CHECK_HEADERS([attr/xattr.h])
40
  # First check for <sys/xattr.h>
41
  AM_CONDITIONAL([TAR_COND_XATTR_H],[test "$ac_cv_header_attr_xattr_h" = yes])
41
  AC_CHECK_HEADERS([sys/xattr.h])
42
  if test "$ac_cv_header_attr_xattr_h" = yes; then
42
  AM_CONDITIONAL([TAR_COND_XATTR_H],[test "$ac_cv_header_sys_xattr_h" = yes])
43
  AM_CONDITIONAL([TAR_LIB_ATTR],[false])
44
  if test "$ac_cv_header_sys_xattr_h" = yes; then
43
    AC_CHECK_FUNCS(getxattr  fgetxattr  lgetxattr \
45
    AC_CHECK_FUNCS(getxattr  fgetxattr  lgetxattr \
44
                   setxattr  fsetxattr  lsetxattr \
46
                   setxattr  fsetxattr  lsetxattr \
45
                   listxattr flistxattr llistxattr,
47
                   listxattr flistxattr llistxattr,
46
        # only when functions are present
48
        # only when functions are present
47
        AC_DEFINE([HAVE_ATTR_XATTR_H], [1],
49
        AC_DEFINE([HAVE_SYS_XATTR_H], [1],
48
                    [define to 1 if we have <attr/xattr.h> header])
50
                    [define to 1 if we have <sys/xattr.h> header])
49
        if test "$with_xattrs" != no; then
51
        if test "$with_xattrs" != no; then
50
          AC_DEFINE([HAVE_XATTRS],,[Define when we have working linux xattrs.])
52
          AC_DEFINE([HAVE_XATTRS],,[Define when we have working linux xattrs.])
51
        fi
53
        fi
52
    )
54
    )
53
  fi
55
  fi
56
57
  # If <sys/xattr.h> is not found, then check for <attr/xattr.h>
58
  if test "$ac_cv_header_sys_xattr_h" != yes; then
59
    AC_CHECK_HEADERS([attr/xattr.h])
60
    AM_CONDITIONAL([TAR_COND_XATTR_H],[test "$ac_cv_header_attr_xattr_h" = yes])
61
    AC_CHECK_LIB([attr],[fgetxattr])
62
    AM_CONDITIONAL([TAR_LIB_ATTR],[test "$ac_cv_lib_attr_fgetxattr" = yes])
63
    if test "$ac_cv_header_attr_xattr_h" = yes; then
64
      AC_CHECK_FUNCS(getxattr  fgetxattr  lgetxattr \
65
                     setxattr  fsetxattr  lsetxattr \
66
                     listxattr flistxattr llistxattr,
67
          # only when functions are present
68
          AC_DEFINE([HAVE_ATTR_XATTR_H], [1],
69
                      [define to 1 if we have <attr/xattr.h> header])
70
          if test "$with_xattrs" != no; then
71
            AC_DEFINE([HAVE_XATTRS],,[Define when we have working linux xattrs.])
72
          fi
73
      )
74
    fi
75
  fi
54
])
76
])
(-)a/lib/xattr-at.h (-1 / +9 lines)
Lines 20-26 Link Here
20
#define XATTRS_AT_H
20
#define XATTRS_AT_H
21
21
22
#include <sys/types.h>
22
#include <sys/types.h>
23
#include <attr/xattr.h>
23
#if defined(HAVE_SYS_XATTR_H)
24
# include <sys/xattr.h>
25
#elif defined(HAVE_ATTR_XATTR_H)
26
# include <attr/xattr.h>
27
#endif
28
29
#ifndef ENOATTR
30
# define ENOATTR ENODATA        /* No such attribute */
31
#endif
24
32
25
/* These are the dir-fd-relative variants of the functions without the
33
/* These are the dir-fd-relative variants of the functions without the
26
   "at" suffix.  For example, setxattrat (AT_FDCWD, path, name, value, size,
34
   "at" suffix.  For example, setxattrat (AT_FDCWD, path, name, value, size,
(-)a/src/Makefile.am (-1 / +4 lines)
Lines 51-53 AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS) Link Here
51
LDADD = ../lib/libtar.a ../gnu/libgnu.a $(LIBINTL) $(LIBICONV)
51
LDADD = ../lib/libtar.a ../gnu/libgnu.a $(LIBINTL) $(LIBICONV)
52
52
53
tar_LDADD = $(LIBS) $(LDADD) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) $(LIB_SELINUX)
53
tar_LDADD = $(LIBS) $(LDADD) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) $(LIB_SELINUX)
54
- 
54
55
if TAR_LIB_ATTR
56
tar_LDADD += -lattr
57
endif

Return to bug 489170