From 05c8eba11c51ca928eee9c041de1a4192e590aec Mon Sep 17 00:00:00 2001
From: nianjiuhuiyi <64776403+nianjiuhuiyi@users.noreply.github.com>
Date: 星期五, 27 六月 2025 09:57:45 +0800
Subject: [PATCH] Fix: 修复c++后端服务因为空数组的异常退出,以及c++的http服务在收到Ctrl+C信号后无法正常退出 (#2571)

---
 runtime/onnxruntime/src/precomp.h |   19 +++++--------------
 1 files changed, 5 insertions(+), 14 deletions(-)

diff --git a/runtime/onnxruntime/src/precomp.h b/runtime/onnxruntime/src/precomp.h
index d74608c..d525c65 100644
--- a/runtime/onnxruntime/src/precomp.h
+++ b/runtime/onnxruntime/src/precomp.h
@@ -18,20 +18,7 @@
 #include <cstring>
 
 #ifdef _WIN32
-#include<io.h>
-#ifndef R_OK
-#define R_OK 4
-#endif
-#ifndef W_OK
-#define W_OK 2
-#endif
-#ifndef X_OK
-#define X_OK 0 
-#endif
-#ifndef F_OK
-#define F_OK 0
-#endif
-#define access _access
+#include <win_func.h>
 #else
 #include <unistd.h>
 #endif
@@ -77,6 +64,10 @@
 #include "seg_dict.h"
 #include "resample.h"
 #include "paraformer.h"
+#include "sensevoice-small.h"
+#ifdef USE_GPU
+#include "paraformer-torch.h"
+#endif
 #include "paraformer-online.h"
 #include "offline-stream.h"
 #include "tpass-stream.h"

--
Gitblit v1.9.1