diff options
-rw-r--r-- | src/nvim/event/socket.c | 2 | ||||
-rw-r--r-- | src/nvim/fileio.c | 4 | ||||
-rw-r--r-- | src/nvim/os/fileio.c | 5 | ||||
-rw-r--r-- | src/nvim/os/fs.c | 2 | ||||
-rw-r--r-- | third-party/CMakeLists.txt | 4 |
5 files changed, 11 insertions, 6 deletions
diff --git a/src/nvim/event/socket.c b/src/nvim/event/socket.c index 6fcb9f7e7a..af326f9c82 100644 --- a/src/nvim/event/socket.c +++ b/src/nvim/event/socket.c @@ -169,7 +169,7 @@ void socket_watcher_close(SocketWatcher *watcher, socket_close_cb cb) FUNC_ATTR_NONNULL_ARG(1) { watcher->close_cb = cb; - uv_close((uv_handle_t *)watcher->stream, close_cb); + uv_close(STRUCT_CAST(uv_handle_t, watcher->stream), close_cb); } static void connection_event(void **argv) diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index 6356290b9c..ba3625bf95 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -3405,7 +3405,9 @@ restore_backup: // (could be a pipe). // If the 'fsync' option is FALSE, don't fsync(). Useful for laptops. int error; - if (p_fs && (error = os_fsync(fd)) != 0 && !device) { + if (p_fs && (error = os_fsync(fd)) != 0 && !device + // fsync not supported on this storage. + && error != UV_ENOTSUP) { SET_ERRMSG_ARG(_("E667: Fsync failed: %s"), error); end = 0; } diff --git a/src/nvim/os/fileio.c b/src/nvim/os/fileio.c index ccf35fd57c..bb68326a03 100644 --- a/src/nvim/os/fileio.c +++ b/src/nvim/os/fileio.c @@ -229,7 +229,10 @@ int file_fsync(FileDescriptor *const fp) return flush_error; } const int fsync_error = os_fsync(fp->fd); - if (fsync_error != UV_EINVAL && fsync_error != UV_EROFS) { + if (fsync_error != UV_EINVAL + && fsync_error != UV_EROFS + // fsync not supported on this storage. + && fsync_error != UV_ENOTSUP) { return fsync_error; } return 0; diff --git a/src/nvim/os/fs.c b/src/nvim/os/fs.c index 9a4391a0ae..99ece275b1 100644 --- a/src/nvim/os/fs.c +++ b/src/nvim/os/fs.c @@ -643,7 +643,7 @@ ptrdiff_t os_write(const int fd, const char *const buf, const size_t size, /// /// @param fd the file descriptor of the file to flush to disk. /// -/// @return `0` on success, a libuv error code on failure. +/// @return 0 on success, or libuv error code on failure. int os_fsync(int fd) { int r; diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt index f316e5bd0d..b1c8c95b31 100644 --- a/third-party/CMakeLists.txt +++ b/third-party/CMakeLists.txt @@ -123,8 +123,8 @@ if(WIN32) set(LIBUV_URL https://github.com/neovim/libuv/archive/0ed7feb71ca949f7a96ccb102481d17ea1bb5933.tar.gz) set(LIBUV_SHA256 813fe763022f19878557c6fde311b6394fb9180caaaab0dd98d8704732234508) else() - set(LIBUV_URL https://github.com/libuv/libuv/archive/v1.23.2.tar.gz) - set(LIBUV_SHA256 30af979c4f4b8d1b895ae6d115f7400c751542ccb9e656350fc89fda08d4eabd) + set(LIBUV_URL https://github.com/libuv/libuv/archive/v1.26.0.tar.gz) + set(LIBUV_SHA256 e414cf74615b7dae768f0f5667092f1d4975f5067c087bcbe0641e241ebe4693) endif() set(MSGPACK_URL https://github.com/msgpack/msgpack-c/releases/download/cpp-3.0.0/msgpack-3.0.0.tar.gz) |