]> granicus.if.org Git - vim/commitdiff
patch 8.1.0961: Mac: fsync may fail sometimes v8.1.0961
authorBram Moolenaar <Bram@vim.org>
Thu, 21 Feb 2019 11:16:12 +0000 (12:16 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 21 Feb 2019 11:16:12 +0000 (12:16 +0100)
Problem:    Mac: fsync may fail sometimes.
Solution:   Do not check errno. (Yee Cheng Chin, closes #4025)

src/fileio.c
src/version.c

index ab2c3fd01d73764443835896bf29ad6d2e57eea0..4060f69d3fb58eade9b2ebae0a3b934e4cb11a16 100644 (file)
@@ -5135,7 +5135,7 @@ vim_fsync(int fd)
 
 # ifdef MACOS_X
     r = fcntl(fd, F_FULLFSYNC);
-    if (r != 0 && (errno == ENOTTY || errno == ENOTSUP))
+    if (r != 0)  // F_FULLFSYNC not working or not supported
 # endif
        r = fsync(fd);
     return r;
index 9157ff5f90cb7aca29ac1126245b94db4f231f2a..db9ab91f7b86c3e1bd78e88df3dd5c59c67efaf7 100644 (file)
@@ -779,6 +779,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    961,
 /**/
     960,
 /**/