代码拉取完成,页面将自动刷新
同步操作将从 OpenHarmony/third_party_curl 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From f446258f0269a62289cca0210157cb8558d0edc3 Mon Sep 17 00:00:00 2001
From: Daniel Stenberg <daniel@haxx.se>
Date: Tue, 16 May 2023 23:40:42 +0200
Subject: [PATCH 1/1] hostip: include easy_lock.h before using
GLOBAL_INIT_IS_THREADSAFE
Since that header file is the only place that define can be defined.
Reported-by: Marc Deslauriers
Follow-up to 13718030ad4b3209
Closes #11121
Conflict:context adapt
Reference:https://github.com/curl/curl/commit/f446258f0269a62289cca0210157cb8558d0edc3
---
lib/hostip.c | 10 ++++------
lib/hostip.h | 9 ---------
2 files changed, 4 insertions(+), 15 deletions(-)
diff --git a/lib/hostip.c b/lib/hostip.c
index 615f36c16..4ff348436 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -70,6 +70,8 @@
#include <SystemConfiguration/SCDynamicStoreCopySpecific.h>
#endif
+#include "easy_lock.h"
+
#if defined(CURLRES_SYNCH) && \
defined(HAVE_ALARM) && \
defined(SIGALRM) && \
@@ -79,10 +81,6 @@
#define USE_ALARM_TIMEOUT
#endif
-#ifdef USE_ALARM_TIMEOUT
-#include "easy_lock.h"
-#endif
-
#define MAX_HOSTCACHE_LEN (255 + 7) /* max FQDN + colon + port number + zero */
/*
@@ -289,8 +287,8 @@ void Curl_hostcache_prune(struct Curl_easy *data)
/* Beware this is a global and unique instance. This is used to store the
return address that we can jump back to from inside a signal handler. This
is not thread-safe stuff. */
-sigjmp_buf curl_jmpenv;
-curl_simple_lock curl_jmpenv_lock;
+static sigjmp_buf curl_jmpenv;
+static curl_simple_lock curl_jmpenv_lock;
#endif
/* lookup address, returns entry if found and not stale */
diff --git a/lib/hostip.h b/lib/hostip.h
index 4b5481f65..0dd19e87c 100644
--- a/lib/hostip.h
+++ b/lib/hostip.h
@@ -186,15 +186,6 @@ Curl_cache_addr(struct Curl_easy *data, struct Curl_addrinfo *addr,
#define CURL_INADDR_NONE INADDR_NONE
#endif
-#ifdef HAVE_SIGSETJMP
-/* Forward-declaration of variable defined in hostip.c. Beware this
- * is a global and unique instance. This is used to store the return
- * address that we can jump back to from inside a signal handler.
- * This is not thread-safe stuff.
- */
-extern sigjmp_buf curl_jmpenv;
-#endif
-
/*
* Function provided by the resolver backend to set DNS servers to use.
*/
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。