diff --git a/pom.xml b/pom.xml
index 86f0cfd29..dcf6808c1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -94,11 +94,11 @@
${quicheHomeDir}/include
https://github.com/cloudflare/quiche
master
- 6d070ed8694216806f3ce689d71ceb7ad76d425e
+ 7eb57c4fc608932acc76c3ee2759c2e41e51d566
${project.build.directory}/generated-sources
${project.build.directory}/template
- -std=c99 -Werror -fno-omit-frame-pointer -fvisibility=hidden -Wunused -Wno-unused-value -O3 -I${quicheHomeIncludeDir} -I${boringsslHomeIncludeDir}
+ -std=gnu99 -Werror -fno-omit-frame-pointer -fvisibility=hidden -Wunused -Wno-unused-value -O3 -I${quicheHomeIncludeDir} -I${boringsslHomeIncludeDir}
-L${quicheHomeBuildDir} -lquiche -L${boringsslHomeBuildDir} -lssl -lcrypto
@@ -185,7 +185,7 @@
libssl.a
libcrypto.a
libquiche.a
- -Wl,--strip-debug -Wl,--exclude-libs,ALL -lrt
+ -Wl,--strip-debug -Wl,--exclude-libs,ALL -Wl,-lrt
META-INF/native/lib${jniLibName}.so;osname=linux;processor=${os.detected.arch}
@@ -202,7 +202,7 @@
libssl.a
libcrypto.a
libquiche.a
- -Wl,--strip-debug -Wl,--exclude-libs,ALL -lrt
+ -Wl,--strip-debug -Wl,--exclude-libs,ALL
META-INF/native/lib${jniLibName}.so;osname=linux;processor=aarch_64
netty_quiche_linux_aarch_64
linux-aarch_64
diff --git a/src/main/c/netty_quic_quiche.c b/src/main/c/netty_quic_quiche.c
index 40324433b..8889ef388 100644
--- a/src/main/c/netty_quic_quiche.c
+++ b/src/main/c/netty_quic_quiche.c
@@ -22,12 +22,17 @@
#ifdef _WIN32
#include
#include
+// This needs to be included for quiche_recv_info and quiche_send_info structs.
+#include
#else
#include
#include
#include
+// This needs to be included for quiche_recv_info and quiche_send_info structs.
+#include
#endif // _WIN32
+
#include
#include "netty_jni_util.h"
#include "netty_quic_boringssl.h"
@@ -48,9 +53,6 @@ static jobject quiche_logger;
static JavaVM *global_vm = NULL;
static char* staticPackagePrefix = NULL;
-// Add extern declaration to let it compile with -std=c99
-extern char* strdup(const char*);
-
jint quic_get_java_env(JNIEnv **env)
{
return (*global_vm)->GetEnv(global_vm, (void **)env, NETTY_JNI_UTIL_JNI_VERSION);
diff --git a/src/main/java/io/netty/incubator/codec/quic/QuicheQuicConnection.java b/src/main/java/io/netty/incubator/codec/quic/QuicheQuicConnection.java
index d51d3b4fc..1ec3877b2 100644
--- a/src/main/java/io/netty/incubator/codec/quic/QuicheQuicConnection.java
+++ b/src/main/java/io/netty/incubator/codec/quic/QuicheQuicConnection.java
@@ -47,6 +47,8 @@ final class QuicheQuicConnection {
// TODO: Maybe cache these per thread as we only use them temporary within a limited scope.
infoBuffer = Quiche.allocateNativeOrder(QUICHE_SEND_INFOS_OFFSET +
2 * Quiche.SIZEOF_QUICHE_SEND_INFO);
+ // Let's memset the memory.
+ infoBuffer.setZero(0, infoBuffer.capacity());
}
void free() {