From 703f11123a2c8d94494fe3fa030f5e8d1f2317da Mon Sep 17 00:00:00 2001 From: GregTho <43743986+GregTho@users.noreply.github.com> Date: Tue, 2 Oct 2018 12:16:14 +0200 Subject: [PATCH] Use ::_close rather than ::close in Win32 stubs. The former is the proper converse of _open, which is used in ::google::protobuf::internal::win32::open. This resolves issue #5209. --- src/google/protobuf/stubs/io_win32.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/google/protobuf/stubs/io_win32.cc b/src/google/protobuf/stubs/io_win32.cc index f00a268feb..d0f57dfddb 100644 --- a/src/google/protobuf/stubs/io_win32.cc +++ b/src/google/protobuf/stubs/io_win32.cc @@ -334,7 +334,7 @@ FILE* fopen(const char* path, const char* mode) { #endif } -int close(int fd) { return ::close(fd); } +int close(int fd) { return ::_close(fd); } int dup(int fd) { return ::_dup(fd); }