From 9fd1368611392c21f92fa0029c21b5061b18afc3 Mon Sep 17 00:00:00 2001 From: Takeshi Nakatani Date: Sun, 2 Oct 2016 07:23:19 +0000 Subject: [PATCH] OS-specific correspondence of the extended attribute header --- configure.ac | 4 ++++ src/common.h | 11 +++++++++++ src/s3fs.cpp | 1 - 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index b20c9ad..6458914 100644 --- a/configure.ac +++ b/configure.ac @@ -29,6 +29,10 @@ AM_INIT_AUTOMAKE([foreign]) AC_PROG_CXX AC_PROG_CC +AC_CHECK_HEADERS([sys/xattr.h]) +AC_CHECK_HEADERS([attr/xattr.h]) +AC_CHECK_HEADERS([sys/extattr.h]) + CXXFLAGS="$CXXFLAGS -Wall -D_FILE_OFFSET_BITS=64" dnl ---------------------------------------------- diff --git a/src/common.h b/src/common.h index 013ad35..e2352a2 100644 --- a/src/common.h +++ b/src/common.h @@ -23,6 +23,17 @@ #include "../config.h" +// +// Extended attribute +// +#ifdef HAVE_SYS_EXTATTR_H +#include +#elif HAVE_ATTR_XATTR_H +#include +#elif HAVE_SYS_XATTR_H +#include +#endif + // // Macro // diff --git a/src/s3fs.cpp b/src/s3fs.cpp index fac70d6..c886ddf 100644 --- a/src/s3fs.cpp +++ b/src/s3fs.cpp @@ -34,7 +34,6 @@ #include #include #include -#include #include #include