# ifndef HAVE_FCHOWN
return chown(pathname, owner, group);
# else
+# ifdef O_NOFOLLOW
if (flag & AT_SYMLINK_NOFOLLOW)
oflags |= O_NOFOLLOW;
+# endif /* O_NOFOLLOW */
if ((fd = open(path, oflags)) == -1)
return -1;
ret = fchown(fd, owner, group);
# ifndef HAVE_FCHMOD
return chown(pathname, owner, group);
# else
+# ifdef O_NOFOLLOW
if (flag & AT_SYMLINK_NOFOLLOW)
oflags |= O_NOFOLLOW;
+# endif /* O_NOFOLLOW */
if ((fd = open(path, oflags)) == -1)
return -1;
ret = fchmod(fd, mode);