OS-specific correspondence of the extended attribute header

This commit is contained in:
Takeshi Nakatani 2016-10-02 07:23:19 +00:00
parent 9f174d7614
commit 9fd1368611
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>