1 /* Replacement <attr/xattr.h> for platforms that lack it.
2 Copyright 2012-2013 Free Software Foundation, Inc.
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
17 #ifndef TAR_ATTR_XATTR_H
18 #define TAR_ATTR_XATTR_H
21 # define ENOATTR ENODATA /* No such attribute */
25 static inline int setxattr (const char *path, const char *name, const void
26 *value, size_t size, int flags)
27 { errno = ENOTSUP; return -1; }
29 static inline int lsetxattr (const char *path, const char *name, const void
30 *value, size_t size, int flags)
31 { errno = ENOTSUP; return -1; }
33 static inline int fsetxattr (int filedes, const char *name, const void *value,
34 size_t size, int flags)
35 { errno = ENOTSUP; return -1; }
39 static inline ssize_t getxattr (const char *path, const char *name, void *value,
41 { errno = ENOTSUP; return -1; }
42 static inline ssize_t lgetxattr (const char *path, const char *name, void
44 { errno = ENOTSUP; return -1; }
45 static inline ssize_t fgetxattr (int filedes, const char *name, void *value,
47 { errno = ENOTSUP; return -1; }
51 static inline ssize_t listxattr (const char *path, char *list, size_t size)
52 { errno = ENOTSUP; return -1; }
54 static inline ssize_t llistxattr (const char *path, char *list, size_t size)
55 { errno = ENOTSUP; return -1; }
57 static inline ssize_t flistxattr (int filedes, char *list, size_t size)
58 { errno = ENOTSUP; return -1; }