From a365878d8760bd0f2dba393c2e14fec8a97c00ef Mon Sep 17 00:00:00 2001 From: Edo Date: Mon, 27 Mar 2023 11:45:48 +0100 Subject: [PATCH] maint(file_system): use msvc _set_errno func --- src/module/file_system.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/module/file_system.cpp b/src/module/file_system.cpp index ee5fc41..c5d7763 100644 --- a/src/module/file_system.cpp +++ b/src/module/file_system.cpp @@ -31,7 +31,7 @@ namespace FILE* file_open_append_text(const char* filename) { - errno = 0; + _set_errno(0); auto* file = std::fopen(filename, "at"); if (file) { @@ -44,7 +44,7 @@ namespace FILE* file_open_write_binary(const char* filename) { - errno = 0; + _set_errno(0); auto* file = std::fopen(filename, "wb"); if (file) {