OS X has fsetxattr() in another header and with different arguments.
For now, check for the Linux variant and if not available, skip
the code using the call.
Signed-off-by: Jan Tulak <jtulak@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
AC_HAVE_MNTENT
AC_HAVE_FLS
AC_HAVE_READDIR
+AC_HAVE_FSETXATTR
if test "$enable_blkid" = yes; then
AC_HAVE_BLKID_TOPO
int tfd,
xfs_bstat_t *bstatp)
{
+#ifdef HAVE_FSETXATTR
struct stat64 tstatbuf;
int i;
int diff = 0;
if (dflag && diff)
fsrprintf(_("failed to match fork offset\n"));;
+#endif /* HAVE_FSETXATTR */
return 0;
}
HAVE_READDIR = @have_readdir@
HAVE_MNTENT = @have_mntent@
HAVE_FLS = @have_fls@
+HAVE_FSETXATTR = @have_fsetxattr@
GCCFLAGS = -funsigned-char -fno-strict-aliasing -Wall
# -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-decl
ifeq ($(HAVE_MNTENT),yes)
PCFLAGS+= -DHAVE_MNTENT
endif
+ifeq ($(HAVE_FSETXATTR),yes)
+PCFLAGS+= -DHAVE_FSETXATTR
+endif
ifeq ($(ENABLE_BLKID),yes)
PCFLAGS+= -DENABLE_BLKID
endif
AC_SUBST(have_fls)
])
+#
+# Check if we have a fsetxattr call (Mac OS X)
+#
+AC_DEFUN([AC_HAVE_FSETXATTR],
+ [ AC_CHECK_DECL([fsetxattr],
+ have_fsetxattr=yes,
+ [],
+ [#include <sys/types.h>
+ #include <attr/xattr.h>]
+ )
+ AC_SUBST(have_fsetxattr)
+ ])
+
#
# Check if there is mntent.h
#