summaryrefslogtreecommitdiff
path: root/lib/replace/system
diff options
context:
space:
mode:
Diffstat (limited to 'lib/replace/system')
-rw-r--r--lib/replace/system/filesys.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/lib/replace/system/filesys.h b/lib/replace/system/filesys.h
index 2393068b4f..cf8b36b53f 100644
--- a/lib/replace/system/filesys.h
+++ b/lib/replace/system/filesys.h
@@ -123,11 +123,26 @@
#include <sys/xattr.h>
#endif
+#ifdef HAVE_SYS_EA_H
+#include <sys/ea.h>
+#endif
+
+#ifdef HAVE_SYS_EXTATTR_H
+#include <sys/extattr.h>
+#endif
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
+#ifndef XATTR_CREATE
+#define XATTR_CREATE 0x1 /* set value, fail if attr already exists */
+#endif
+
+#ifndef XATTR_REPLACE
+#define XATTR_REPLACE 0x2 /* set value, fail if attr does not exist */
+#endif
+
/* Some POSIX definitions for those without */
#ifndef S_IFDIR
@@ -208,4 +223,45 @@
#define ENOATTR ENODATA
#endif
+
+#if !defined(HAVE_GETXATTR) || defined(XATTR_ADD_OPT)
+ssize_t rep_getxattr (const char *path, const char *name, void *value, size_t size);
+/* define is in "replace.h" */
+#endif
+
+#if !defined(HAVE_FGETXATTR) || defined(XATTR_ADD_OPT)
+ssize_t rep_fgetxattr (int filedes, const char *name, void *value, size_t size);
+/* define is in "replace.h" */
+#endif
+
+#if !defined(HAVE_LISTXATTR) || defined(XATTR_ADD_OPT)
+ssize_t rep_listxattr (const char *path, char *list, size_t size);
+/* define is in "replace.h" */
+#endif
+
+#if !defined(HAVE_FLISTXATTR) || defined(XATTR_ADD_OPT)
+ssize_t rep_flistxattr (int filedes, char *list, size_t size);
+/* define is in "replace.h" */
+#endif
+
+#if !defined(HAVE_REMOVEXATTR) || defined(XATTR_ADD_OPT)
+int rep_removexattr (const char *path, const char *name);
+/* define is in "replace.h" */
+#endif
+
+#if !defined(HAVE_FREMOVEXATTR) || defined(XATTR_ADD_OPT)
+int rep_fremovexattr (int filedes, const char *name);
+/* define is in "replace.h" */
+#endif
+
+#if !defined(HAVE_SETXATTR) || defined(XATTR_ADD_OPT)
+int rep_setxattr (const char *path, const char *name, const void *value, size_t size, int flags);
+/* define is in "replace.h" */
+#endif
+
+#if !defined(HAVE_FSETXATTR) || defined(XATTR_ADD_OPT)
+int rep_fsetxattr (int filedes, const char *name, const void *value, size_t size, int flags);
+/* define is in "replace.h" */
+#endif
+
#endif