summaryrefslogtreecommitdiff
path: root/lib/lchown.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-07-16 23:12:25 +0000
committerJim Meyering <jim@meyering.net>1998-07-16 23:12:25 +0000
commit5b16f997e88b8880156f5ae4a2ec512d3ef5aab2 (patch)
tree7698afdfc436f15ab415cd8d15059761e977d57b /lib/lchown.c
parentee041d6d4f8e02a7b0bd25cceb26a2815668e758 (diff)
downloadcoreutils-5b16f997e88b8880156f5ae4a2ec512d3ef5aab2.tar.xz
[!ENOSYS] (ENOSYS): Define to ENOTSUP or ENOMSG.
Diffstat (limited to 'lib/lchown.c')
-rw-r--r--lib/lchown.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/lchown.c b/lib/lchown.c
index 0b1ebd8f2..6ecf6bbea 100644
--- a/lib/lchown.c
+++ b/lib/lchown.c
@@ -26,6 +26,16 @@
extern int errno;
#endif
+/* Some systems don't have ENOSYS. */
+#ifndef ENOSYS
+# ifdef ENOTSUP
+# define ENOSYS ENOTSUP
+# else
+/* Some systems don't have ENOTSUP either. */
+# define ENOSYS ENOMSG
+# endif
+#endif
+
/* Work just like chown, except when FILE is a symbolic link.
In that case, set errno to ENOSYS and return -1. */