changeset 13730:7b818f7bb738 v8.0.1737

patch 8.0.1737: fchown() used when it is not supported commit https://github.com/vim/vim/commit/02e802b2da9e25b5824185976b163691b5bbd558 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Apr 19 21:15:27 2018 +0200 patch 8.0.1737: fchown() used when it is not supported Problem: fchown() used when it is not supported. Solution: Add #ifdef.
author Christian Brabandt <cb@256bit.org>
date Thu, 19 Apr 2018 21:30:07 +0200
parents ef9c893ecf62
children 54708dd90a51
files src/fileio.c src/version.c
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;
 	    }
 
--- a/src/version.c
+++ b/src/version.c
@@ -763,6 +763,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1737,
+/**/
     1736,
 /**/
     1735,