summaryrefslogtreecommitdiff
path: root/getfattr
diff options
context:
space:
mode:
authorPetr Salinger <Petr.Salinger@seznam.cz>2009-06-05 18:45:33 +0000
committerAndreas Gruenbacher <agruen@suse.de>2009-06-19 17:35:25 +0200
commitb4636a4e9e9ea69e0000a2f3301cec7f446328a6 (patch)
treee488463b0d8bdef14c2e9c82d3155c609895301f /getfattr
parent08b74fdd6daa4fc496dadf6915c40a4f49b0e507 (diff)
downloadattr-b4636a4e9e9ea69e0000a2f3301cec7f446328a6.tar.gz
Build fix for GNU/kFreeBSD
On Linux, ENOATTR aliases to ENODATA. On other operating systems like Irix and BSD*, ENOATTR is a separate error number.
Diffstat (limited to 'getfattr')
-rw-r--r--getfattr/getfattr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/getfattr/getfattr.c b/getfattr/getfattr.c
index db9121a..5ec7f00 100644
--- a/getfattr/getfattr.c
+++ b/getfattr/getfattr.c
@@ -91,8 +91,11 @@ int do_listxattr(const char *path, char *list, size_t size)
const char *strerror_ea(int err)
{
+#ifdef __linux__
+ /* The Linux kernel does not define ENOATTR, but maps it to ENODATA. */
if (err == ENODATA)
return _("No such attribute");
+#endif
return strerror(err);
}