Merge pull request #477 from ggtakec/master

OS-specific correspondence of the extended attribute header
This commit is contained in:
Takeshi Nakatani 2016-10-02 16:34:55 +09:00 committed by GitHub
commit 1a93897e85
3 changed files with 15 additions and 1 deletions

View File

@ -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 ----------------------------------------------

View File

@ -23,6 +23,17 @@
#include "../config.h"
//
// Extended attribute
//
#ifdef HAVE_SYS_EXTATTR_H
#include <sys/extattr.h>
#elif HAVE_ATTR_XATTR_H
#include <attr/xattr.h>
#elif HAVE_SYS_XATTR_H
#include <sys/xattr.h>
#endif
//
// Macro
//

View File

@ -34,7 +34,6 @@
#include <pwd.h>
#include <grp.h>
#include <getopt.h>
#include <sys/xattr.h>
#include <signal.h>
#include <fstream>