summaryrefslogtreecommitdiff
path: root/include/sys/xattr.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-07-23 16:39:44 -0400
committerRich Felker <dalias@aerifal.cx>2012-07-23 16:39:44 -0400
commit207460d09742304941f1a010a89fc2efa46bcb29 (patch)
tree69f53d2669c7877e8d0c4fb298a8f64ca543dd40 /include/sys/xattr.h
parent42f0e965c42d7611e7a02718bffb1a8ffba74488 (diff)
downloadmusl-207460d09742304941f1a010a89fc2efa46bcb29.tar.gz
add extended attributes syscalls
based on patch by orc and Isaac Dunham, with some fixes.
Diffstat (limited to 'include/sys/xattr.h')
-rw-r--r--include/sys/xattr.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/sys/xattr.h b/include/sys/xattr.h
new file mode 100644
index 00000000..2801cb85
--- /dev/null
+++ b/include/sys/xattr.h
@@ -0,0 +1,27 @@
+#ifndef _SYS_XATTR_H
+#define _SYS_XATTR_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define __NEED_ssize_t
+#define __NEED_size_t
+#include <bits/alltypes.h>
+
+#define XATTR_CREATE 1
+#define XATTR_REPLACE 2
+
+ssize_t getxattr(const char *, const char *, void *, size_t);
+ssize_t lgetxattr(const char *, const char *, void *, size_t);
+ssize_t fgetxattr(int filedes, const char *, void *, size_t);
+ssize_t listxattr(const char *, char *, size_t);
+ssize_t llistxattr(const char *, char *, size_t);
+ssize_t flistxattr(int filedes, char *, size_t);
+int setxattr(const char *, const char *, const void *, size_t, int);
+int lsetxattr(const char *, const char *, const void *, size_t, int);
+int fsetxattr(int, const char *, const void *, size_t, int);
+
+#ifdef __cplusplus
+}
+#endif
+#endif