From 8c30f11c17f3a0cd07860e382aa2dbd3986b8ede Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sat, 5 Feb 2022 20:55:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dwindows=E4=B8=8B=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Http/HttpBody.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Http/HttpBody.cpp b/src/Http/HttpBody.cpp index 3103f2d1..922d4811 100644 --- a/src/Http/HttpBody.cpp +++ b/src/Http/HttpBody.cpp @@ -67,15 +67,15 @@ HttpFileBody::HttpFileBody(const std::shared_ptr &fp, size_t offset, size_ init(fp, offset, max_size, use_mmap); } -#if defined(__linux__) || defined(__linux) +#if defined(__linux__) || defined(__linux) #include #endif int HttpFileBody::sendFile(int fd) { +#if defined(__linux__) || defined(__linux) static onceToken s_token([]() { signal(SIGPIPE, SIG_IGN); }); -#if defined(__linux__) || defined(__linux) off_t off = _file_offset; return sendfile(fd, fileno(_fp.get()), &off, _max_size); #else