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

Collapse All | Expand All

(-)a/acinclude.m4 (-28 / +14 lines)
Lines 40-76 AC_DEFUN([TAR_HEADERS_ATTR_XATTR_H], Link Here
40
  # First check for <sys/xattr.h>
40
  # First check for <sys/xattr.h>
41
  AC_CHECK_HEADERS([sys/xattr.h])
41
  AC_CHECK_HEADERS([sys/xattr.h])
42
  AM_CONDITIONAL([TAR_COND_XATTR_H],[test "$ac_cv_header_sys_xattr_h" = yes])
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
45
    AC_CHECK_FUNCS(getxattr  fgetxattr  lgetxattr \
46
                   setxattr  fsetxattr  lsetxattr \
47
                   listxattr flistxattr llistxattr,
48
        # only when functions are present
49
        AC_DEFINE([HAVE_SYS_XATTR_H], [1],
50
                    [define to 1 if we have <sys/xattr.h> header])
51
        if test "$with_xattrs" != no; then
52
          AC_DEFINE([HAVE_XATTRS],,[Define when we have working linux xattrs.])
53
        fi
54
    )
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
43
  if test "$ac_cv_header_sys_xattr_h" != yes; then
59
    AC_CHECK_HEADERS([attr/xattr.h])
44
    AC_CHECK_HEADERS([attr/xattr.h])
60
    AM_CONDITIONAL([TAR_COND_XATTR_H],[test "$ac_cv_header_attr_xattr_h" = yes])
45
    AM_CONDITIONAL([TAR_COND_XATTR_H],[test "$ac_cv_header_attr_xattr_h" = yes])
61
    AC_CHECK_LIB([attr],[fgetxattr])
46
  fi
62
    AM_CONDITIONAL([TAR_LIB_ATTR],[test "$ac_cv_lib_attr_fgetxattr" = yes])
47
63
    if test "$ac_cv_header_attr_xattr_h" = yes; then
48
  if test "$with_xattrs" != no; then
64
      AC_CHECK_FUNCS(getxattr  fgetxattr  lgetxattr \
49
    for i in getxattr  fgetxattr  lgetxattr \
65
                     setxattr  fsetxattr  lsetxattr \
50
             setxattr  fsetxattr  lsetxattr \
66
                     listxattr flistxattr llistxattr,
51
             listxattr flistxattr llistxattr
67
          # only when functions are present
52
    do
68
          AC_DEFINE([HAVE_ATTR_XATTR_H], [1],
53
      AC_SEARCH_LIBS($i, attr)
69
                      [define to 1 if we have <attr/xattr.h> header])
54
      eval found=\$ac_cv_search_$i
70
          if test "$with_xattrs" != no; then
55
      test "$found" = "no" && break
71
            AC_DEFINE([HAVE_XATTRS],,[Define when we have working linux xattrs.])
56
    done
72
          fi
57
73
      )
58
    if test "$found" != no; then
59
      AC_DEFINE([HAVE_XATTRS],,[Define when we have working linux xattrs.])
74
    fi
60
    fi
75
  fi
61
  fi
76
])
62
])
(-)a/lib/xattr-at.c (+7 lines)
Lines 18-23 Link Here
18
18
19
#include <config.h>
19
#include <config.h>
20
20
21
/* Temporarily don't build.  We are unable to build on (probably not only)
22
   darwin due to lack of l*xattr callbacks (XATTR_NOFOLLOW is alternative) and
23
   different function definitions. */
24
#ifdef HAVE_XATTRS
25
21
#include "xattr-at.h"
26
#include "xattr-at.h"
22
#include "openat.h"
27
#include "openat.h"
23
28
Lines 108-110 Link Here
108
#undef AT_FUNC_RESULT
113
#undef AT_FUNC_RESULT
109
#undef AT_FUNC_POST_FILE_PARAM_DECLS
114
#undef AT_FUNC_POST_FILE_PARAM_DECLS
110
#undef AT_FUNC_POST_FILE_ARGS
115
#undef AT_FUNC_POST_FILE_ARGS
116
117
#endif
(-)a/src/Makefile.am (-5 lines)
Lines 52-58 AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS) Link Here
52
LDADD = ../lib/libtar.a ../gnu/libgnu.a $(LIBINTL) $(LIBICONV)
52
LDADD = ../lib/libtar.a ../gnu/libgnu.a $(LIBINTL) $(LIBICONV)
53
53
54
tar_LDADD = $(LIBS) $(LDADD) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) $(LIB_SELINUX)
54
tar_LDADD = $(LIBS) $(LDADD) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) $(LIB_SELINUX)
55
56
if TAR_LIB_ATTR
57
tar_LDADD += -lattr
58
endif
59
- 

Return to bug 548024