summaryrefslogtreecommitdiffstats
path: root/src/fileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 4f35cb9659..f02925bed5 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -712,8 +712,11 @@ readfile(
if (mch_stat((char *)swap_fname, &swap_st) >= 0
&& st.st_gid != swap_st.st_gid
+# ifdef HAVE_FCHOWN
&& fchown(curbuf->b_ml.ml_mfp->mf_fd, -1, st.st_gid)
- == -1)
+# endif
+ == -1
+ )
swap_mode &= 0600;
}