summaryrefslogtreecommitdiff
path: root/lib/makepath.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1993-05-02 21:35:51 +0000
committerJim Meyering <jim@meyering.net>1993-05-02 21:35:51 +0000
commit93dcd189466cc1733b73467b707f7ee5478a621d (patch)
tree1988d3fc69b37efe0293251832fca2e197e0eb5d /lib/makepath.c
parenta4bfda47ac05b6e00c09c59b6900cb49cac5849c (diff)
downloadcoreutils-93dcd189466cc1733b73467b707f7ee5478a621d.tar.xz
merge with 3.5.1
Diffstat (limited to 'lib/makepath.c')
-rw-r--r--lib/makepath.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/makepath.c b/lib/makepath.c
index 4c19630e6..123d6abea 100644
--- a/lib/makepath.c
+++ b/lib/makepath.c
@@ -43,8 +43,11 @@ char *alloca ();
#endif
#ifdef STDC_HEADERS
-#include <errno.h>
#include <stdlib.h>
+#endif
+
+#if defined (STDC_HEADERS) || defined (HAVE_ERRNO_H)
+#include <errno.h>
#else
extern int errno;
#endif
@@ -147,7 +150,7 @@ make_path (argpath, mode, parent_mode, owner, group, verbose_fmt_string)
if (owner != (uid_t) -1 && group != (gid_t) -1
&& chown (dirpath, owner, group)
-#ifdef AFS
+#if defined(AFS) && defined (EPERM)
&& errno != EPERM
#endif
)