Skip to content

Commit 02e802b

Browse files
committed
patch 8.0.1737: fchown() used when it is not supported
Problem: fchown() used when it is not supported. Solution: Add #ifdef.
1 parent 2264008 commit 02e802b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/fileio.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,8 +712,11 @@ readfile(
712712

713713
if (mch_stat((char *)swap_fname, &swap_st) >= 0
714714
&& st.st_gid != swap_st.st_gid
715+
# ifdef HAVE_FCHOWN
715716
&& fchown(curbuf->b_ml.ml_mfp->mf_fd, -1, st.st_gid)
716-
== -1)
717+
# endif
718+
== -1
719+
)
717720
swap_mode &= 0600;
718721
}
719722

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,8 @@ static char *(features[]) =
762762

763763
static int included_patches[] =
764764
{ /* Add new patch number below this line */
765+
/**/
766+
1737,
765767
/**/
766768
1736,
767769
/**/

0 commit comments

Comments
 (0)