From 38c769dc66cc1e20a03a93c71df0840cab302326 Mon Sep 17 00:00:00 2001 From: liuxiyao223 Date: Thu, 16 Nov 2023 15:40:57 +0800 Subject: [PATCH] Set use_ares to 1 Signed-off-by: liuxiyao223 Change-Id: I644a3f66c401988fbb97d8188a1509236553ef42 --- BUILD.gn | 7 +++++++ bundle.json | 7 ++++--- customized/include/curl_config_standard.h | 3 +++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 9acee26c8..25548029d 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -275,6 +275,9 @@ if (defined(ohos_lite)) { "//third_party/nghttp2/lib/includes", "//third_party/nghttp2/lib/includes/nghttp2", ] + if (!is_mingw) { + include_dirs += [ "//third_party/cares/include" ] + } cflags = [ "-Wno-deprecated-declarations" ] } @@ -416,6 +419,10 @@ if (defined(ohos_lite)) { "//third_party/openssl:libssl_shared", "//third_party/zlib:shared_libz", ] + if (!is_mingw) { + deps += [ "//third_party/cares:c_ares" ] + defines = [ "WINDOWS_PLATFORM" ] + } } subsystem_name = "thirdparty" diff --git a/bundle.json b/bundle.json index 5cefcd3ac..c0bdf0e01 100644 --- a/bundle.json +++ b/bundle.json @@ -16,7 +16,7 @@ "syscap": [], "features": [], "adapted_system_type": [ - "mini", + "small", "standard" ], "rom": "", @@ -26,7 +26,8 @@ "third_party": [ "nghttp2", "openssl", - "zlib" + "zlib", + "cares" ] }, "build": { @@ -37,4 +38,4 @@ "test": [] } } -} \ No newline at end of file +} diff --git a/customized/include/curl_config_standard.h b/customized/include/curl_config_standard.h index bc40229eb..121bbbeb3 100644 --- a/customized/include/curl_config_standard.h +++ b/customized/include/curl_config_standard.h @@ -964,6 +964,9 @@ /* Define to enable c-ares support */ /* #undef USE_ARES */ +#ifndef WINDOWS_PLATFORM + #define USE_ARES 1 +#endif // WINDOWS_PLATFORM /* if BearSSL is enabled */ /* #undef USE_BEARSSL */ -- Gitee