Skip to content
This repository was archived by the owner on May 8, 2026. It is now read-only.

Commit 8bd0ac9

Browse files
authored
Compatibility with Android (#813)
Motivation: There are some problems when try to use the codec on android. Modifications: - fix android c++_shared not visible, because not linked - Make QuicChannelBootstrap constructor public for compatibility with Android API <= 24 Result: Be able to use on Android
1 parent 293435d commit 8bd0ac9

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

codec-classes-quic/src/main/java/io/netty/incubator/codec/quic/QuicChannelBootstrap.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ public final class QuicChannelBootstrap {
6060
* pipeline.
6161
*
6262
* @param parent the {@link Channel} that is used as the transport layer.
63+
* @deprecated Use QuicChannel.newBootstrap() instead.
6364
*/
64-
QuicChannelBootstrap(Channel parent) {
65+
@Deprecated
66+
public QuicChannelBootstrap(Channel parent) {
6567
Quic.ensureAvailability();
6668
this.parent = ObjectUtil.checkNotNull(parent, "parent");
6769
}

codec-native-quic/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@
285285
<ldflags>-L${quicheHomeBuildDir} -lquiche -L${boringsslHomeBuildDir} -lssl -lcrypto</ldflags>
286286
<bundleNativeCode>META-INF/native/${jniLibName}.dll;osname=android;processor=${androidAbi}</bundleNativeCode>
287287
<ndkToolchain>${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64</ndkToolchain>
288-
<extraLdflags>-Wl,-soname=${jniLibName}.so -Wl,--build-id=sha1 -Wl,--strip-debug -Wl,--exclude-libs,ALL -lm</extraLdflags>
288+
<extraLdflags>-Wl,-soname=${jniLibName}.so -Wl,--build-id=sha1 -Wl,--strip-debug -Wl,--exclude-libs,ALL -lm -lc++_shared</extraLdflags>
289289

290290
<extraConfigureArg>--host=${androidTriple}</extraConfigureArg>
291291

0 commit comments

Comments
 (0)