]> granicus.if.org Git - vim/commitdiff
patch 8.0.1737: fchown() used when it is not supported v8.0.1737
authorBram Moolenaar <Bram@vim.org>
Thu, 19 Apr 2018 19:15:27 +0000 (21:15 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 19 Apr 2018 19:15:27 +0000 (21:15 +0200)
Problem:    fchown() used when it is not supported.
Solution:   Add #ifdef.

src/fileio.c
src/version.c

index 4f35cb9659e648e271a3e18097e2868cbd3c9d5c..f02925bed5db987f099f5531cb352e899b8fb1d6 100644 (file)
@@ -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;
            }
 
index aff6c6d6adbe34f8d026902fa72315986282bec3..a7720a76a8af19958653d055f913ce50bb7d9b5d 100644 (file)
@@ -762,6 +762,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1737,
 /**/
     1736,
 /**/