- (bal) Use chown() if fchown() does not exist in ftp-server.c patch by
   Tim Rice <tim@multitalents.net>
diff --git a/sftp-server.c b/sftp-server.c
index 346411e..0291da2 100644
--- a/sftp-server.c
+++ b/sftp-server.c
@@ -609,7 +609,11 @@
 				status = errno_to_portable(errno);
 		}
 		if (a->flags & SSH2_FILEXFER_ATTR_UIDGID) {
+#ifdef HAVE_FCHOWN
 			ret = fchown(fd, a->uid, a->gid);
+#else
+			ret = chown(name, a->uid, a->gid);
+#endif
 			if (ret == -1)
 				status = errno_to_portable(errno);
 		}