From a12e96d2c30a2a2edf7b5855de26ef3e3da4635c Mon Sep 17 00:00:00 2001 From: xsren <285808407@qq.com> Date: Tue, 10 Sep 2024 13:51:25 +0800 Subject: [PATCH] fix: build on windows --- source/os/src/osFile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/os/src/osFile.c b/source/os/src/osFile.c index f4afaeabd1..3be2b1e351 100644 --- a/source/os/src/osFile.c +++ b/source/os/src/osFile.c @@ -401,7 +401,7 @@ HANDLE taosOpenFileNotStream(const char *path, int32_t tdFileOptions) { } if (h == INVALID_HANDLE_VALUE) { DWORD dwError = GetLastError(); - terrno = TAOS_SYSTEM_WINAPI_ERROR(error); + terrno = TAOS_SYSTEM_WINAPI_ERROR(dwError); // LPVOID lpMsgBuf; // FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwError, 0, (LPTSTR)&lpMsgBuf, 0, // NULL);