diff --git a/build.sh b/build.sh index 7d29b7b..a84ff6d 100644 --- a/build.sh +++ b/build.sh @@ -183,6 +183,7 @@ pushd "${CURL_DIR}" patch -p1 -b < "${BASE_DIR}/patch/curl_threads.diff" patch -p1 -b < "${BASE_DIR}/patch/curl_tool_doswin.diff" patch -p1 -b < "${BASE_DIR}/patch/curl_tool_parsecfg.diff" +patch -p1 -b < "${BASE_DIR}/patch/curl_url.diff" sed -i -E 's/\bmain[[:space:]]*\(([^\(\)]*)\)/wmain(\1)/g' configure CFLAGS="-municode -mconsole -march=${MY_MARCH} -mtune=${MY_MTUNE} -I\"${LIBS_DIR}/include\"" CPPFLAGS="-DNGHTTP2_STATICLIB" LDFLAGS="-static -no-pthread -L\"${LIBS_DIR}/lib\"" LIBS="-latomic -liconv -lcrypt32" PKG_CONFIG_PATH="${LIBS_DIR}/pkgconfig" ./configure --enable-static --disable-shared --disable-pthreads --disable-libcurl-option --disable-openssl-auto-load-config --with-zlib="${LIBS_DIR}" --with-zstd="${LIBS_DIR}" --with-brotli="${LIBS_DIR}" --with-openssl="${LIBS_DIR}" --with-libssh2="${LIBS_DIR}" --with-nghttp2="${LIBS_DIR}" --with-libidn2="${LIBS_DIR}" --with-gsasl="${LIBS_DIR}" --without-ca-bundle make curl_LDFLAGS=-all-static diff --git a/patch/curl_url.diff b/patch/curl_url.diff new file mode 100644 index 0000000..46922da --- /dev/null +++ b/patch/curl_url.diff @@ -0,0 +1,18 @@ +diff --git "a/D:\\_Sandbox\\curl\\curl-src\\lib\\url.c.orig" "b/D:\\_Sandbox\\curl\\curl-src\\lib\\url.c" +index 1ee38af..0a6ba91 100644 +--- "a/lib/url.c" ++++ "b/lib/url.c" +@@ -1577,11 +1577,11 @@ CURLcode Curl_idnconvert_hostname(struct Curl_easy *data, + #else + int flags = IDN2_NFC_INPUT; + #endif +- int rc = idn2_lookup_ul((const char *)host->name, &ace_hostname, flags); ++ int rc = idn2_lookup_u8((const uint8_t *)host->name, (uint8_t **)&ace_hostname, flags); + if(rc != IDN2_OK) + /* fallback to TR46 Transitional mode for better IDNA2003 + compatibility */ +- rc = idn2_lookup_ul((const char *)host->name, &ace_hostname, ++ rc = idn2_lookup_u8((const uint8_t *)host->name, (uint8_t **)&ace_hostname, + IDN2_TRANSITIONAL); + if(rc == IDN2_OK) { + host->encalloc = (char *)ace_hostname;