build: fix undefined macro: AC_PACKAGE_NEED_GETXATTR_LIBATTR
authorLu Fengqi <lufq.fnst@cn.fujitsu.com>
Mon, 2 Jul 2018 07:00:01 +0000 (15:00 +0800)
committerEryu Guan <guaneryu@gmail.com>
Wed, 4 Jul 2018 12:33:23 +0000 (20:33 +0800)
Because the macro AC_PACKAGE_NEED_GETXATTR_LIBATTR was removed by
the following commit specified by fixes tag, we also need remove
AC_PACKAGE_NEED_GETXATTR_LIBATTR from configure.ac.

In addition, the libattr will not be set after the macro being
removed. This cause gcc fail to link the libattr for fsstress
correctly. The macro AC_PACKAGE_NEED_ATTRGET_LIBATTR has been
obsoleted, so change it to AC_PACKAGE_NEED_ATTRSET_LIBATTR and add
it to configure.ac. It can help check libattr and set libattr
variable.

Fixes: 42b851446ff1 ("build: remove <attr/xattr.h> check")
Reported-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Tested-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
configure.ac
m4/package_attrdev.m4

index 63ea032..aede4f5 100644 (file)
@@ -53,7 +53,7 @@ AC_PACKAGE_NEED_XFS_HANDLE_H
 AC_PACKAGE_NEED_ATTRLIST_LIBHANDLE
 AC_PACKAGE_NEED_ATTRIBUTES_H
 AC_PACKAGE_WANT_ATTRLIST_LIBATTR
-AC_PACKAGE_NEED_GETXATTR_LIBATTR
+AC_PACKAGE_NEED_ATTRSET_LIBATTR
 
 AC_PACKAGE_NEED_SYS_ACL_H
 AC_PACKAGE_NEED_ACL_LIBACL_H
index 9a82f24..d994cfc 100644 (file)
@@ -26,8 +26,8 @@ AC_DEFUN([AC_PACKAGE_WANT_ATTRLIST_LIBATTR],
     AC_SUBST(have_attr_list)
   ])
 
-AC_DEFUN([AC_PACKAGE_NEED_ATTRGET_LIBATTR],
-  [ AC_CHECK_LIB(attr, attr_get,, [
+AC_DEFUN([AC_PACKAGE_NEED_ATTRSET_LIBATTR],
+  [ AC_CHECK_LIB(attr, attr_set,, [
         echo
         echo 'FATAL ERROR: could not find a valid Extended Attributes library.'
         echo 'Install the extended attributes (attr) development package.'