From 8c4efc081249efd9e1197aafd6bc41d40c7c6a57 Mon Sep 17 00:00:00 2001 From: "Patrick Petrushonis (HCG)" Date: Thu, 28 May 2026 16:32:24 -0700 Subject: [PATCH 1/2] build: Android compileSdk 34 + UWP ARM64 warning + Linux WSC test dl libs Bundles three independent low-risk additions: Build/libHttpClient.Android/build.gradle Bumps `compileSdkVersion` from 31 to 34. Required by downstream consumers (Bumblelion) being upgraded to current AGP/Gradle. SDK bump only - no runtime API change. Samples/UWP-Http/Http.vcxproj Suppresses `TreatWarningAsError` for `Release|ARM64` to unblock ARM64 sample builds while a separate cleanup of the underlying warning is pursued. Build/libHttpClient.Linux/CMakeLists.txt Adds `\` to the `WebSocketCompressionTests.Linux` target_link_libraries so the test binary links cleanly. The WebSocket Compression support (#965) addition introduced an unresolved `dlopen`/`dlsym` reference via linked crypto in some agent configurations. This surfaced in downstream consumer pipeline PlayFab.SDKs.All TestDrop (Microsoft ADO def 137186) on 2026-05-28 after Linux clang/dpkg fixes unblocked the prior failure mode. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- Build/libHttpClient.Android/build.gradle | 2 +- Build/libHttpClient.Linux/CMakeLists.txt | 1 + Samples/UWP-Http/Http.vcxproj | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Build/libHttpClient.Android/build.gradle b/Build/libHttpClient.Android/build.gradle index 110bfff8..94e31a9a 100644 --- a/Build/libHttpClient.Android/build.gradle +++ b/Build/libHttpClient.Android/build.gradle @@ -1,7 +1,7 @@ apply plugin: "com.android.library" android { - compileSdkVersion 31 + compileSdkVersion 34 ndkVersion "27.2.12479018" defaultConfig { diff --git a/Build/libHttpClient.Linux/CMakeLists.txt b/Build/libHttpClient.Linux/CMakeLists.txt index 58a52f1b..87622d76 100644 --- a/Build/libHttpClient.Linux/CMakeLists.txt +++ b/Build/libHttpClient.Linux/CMakeLists.txt @@ -226,6 +226,7 @@ if (HC_ENABLE_WEBSOCKET_COMPRESSION AND NOT HC_NOWEBSOCKETS) PRIVATE "${PROJECT_NAME}" Threads::Threads + ${CMAKE_DL_LIBS} # Required for dlopen/dlsym referenced by linked libcrypto in some configurations ) if (NOT BUILD_SHARED_LIBS) diff --git a/Samples/UWP-Http/Http.vcxproj b/Samples/UWP-Http/Http.vcxproj index 322568d6..d423c1da 100644 --- a/Samples/UWP-Http/Http.vcxproj +++ b/Samples/UWP-Http/Http.vcxproj @@ -9,6 +9,7 @@ _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;%(PreprocessorDefinitions) + false From 2817f2edfc7089f8e53b90081b3aca6462c4f0ab Mon Sep 17 00:00:00 2001 From: "Patrick Petrushonis (HCG)" Date: Wed, 3 Jun 2026 15:29:27 -0700 Subject: [PATCH 2/2] build: fix iOS/macOS C-linkage on HCWebSocketOptions; disable asio serial-port on GDK Fixes two regressions surfaced by PlayFab.SDKs.All TestDrop run 148660743 against latest libHttpClient main (post #965 WebSocket Compression): 1) Include/httpClient/httpClient.h DEFINE_ENUM_FLAG_OPERATORS(HCWebSocketOptions) was placed inside the file-wide extern `"C"` block. The macro expands to inline operators returning HCWebSocketOptions&, which clang rejects under -Wreturn-type-c-linkage -Werror on Xcode iOS/macOS builds: error: 'operator|=' has C-linkage specified, but returns user-defined type 'HCWebSocketOptions &' which is incompatible with C Wrap only the macro call in extern `"C++"` so the operators get C++ linkage while the rest of the public surface stays C-linked. 2) Build/libHttpClient.GDK.props GDK builds compile with NOSERIALCOMM (no DCB struct), but asio (pulled in via websocketpp) tries to instantiate win_iocp_serial_port_service. Add ASIO_DISABLE_SERIAL_PORT to the GDK PreprocessorDefinitions; we never use asio's serial-port transport. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- Build/libHttpClient.GDK.props | 7 ++++++- Include/httpClient/httpClient.h | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Build/libHttpClient.GDK.props b/Build/libHttpClient.GDK.props index 118ac231..7ef22c71 100644 --- a/Build/libHttpClient.GDK.props +++ b/Build/libHttpClient.GDK.props @@ -106,7 +106,12 @@ true false ProgramDatabase - __WRL_NO_DEFAULT_LIB__;_LIB;$(libHttpClientDefine);%(PreprocessorDefinitions) + + __WRL_NO_DEFAULT_LIB__;_LIB;ASIO_DISABLE_SERIAL_PORT;$(libHttpClientDefine);%(PreprocessorDefinitions) %(AdditionalIncludeDirectories);$(GDKCrossPlatformPath)GRDK\ExtensionLibraries\Xbox.XCurl.API\Include Guard /Zc:__cplusplus /ZH:SHA_256 /bigobj /Zi %(AdditionalOptions) diff --git a/Include/httpClient/httpClient.h b/Include/httpClient/httpClient.h index 331ae17f..8744a764 100644 --- a/Include/httpClient/httpClient.h +++ b/Include/httpClient/httpClient.h @@ -1043,7 +1043,13 @@ enum class HCWebSocketOptions : uint32_t CompressionClientNoContextTakeover = 0x00000004 }; +// DEFINE_ENUM_FLAG_OPERATORS expands to C++ inline operators returning +// HCWebSocketOptions&, which is not legal inside the surrounding extern "C" +// block. Re-enter C++ linkage just for the macro expansion so callers can +// still combine flags with |, &, ^, etc. +extern "C++" { DEFINE_ENUM_FLAG_OPERATORS(HCWebSocketOptions) +} // extern "C++" /// /// Creates an WebSocket handle.