BUILD: xprt: use an initcall to register the transport layers
Transport layers (raw_sock, ssl_sock, xprt_handshake and xprt_quic)
were using 4 constructors and 2 destructors. The 4 constructors were
replaced with INITCALL and the destructors with REGISTER_POST_DEINIT()
so that we do not depend on this anymore.
diff --git a/src/xprt_quic.c b/src/xprt_quic.c
index 7f331d1..0b2c59c 100644
--- a/src/xprt_quic.c
+++ b/src/xprt_quic.c
@@ -5769,18 +5769,18 @@
.name = "QUIC",
};
-__attribute__((constructor))
static void __quic_conn_init(void)
{
ha_quic_meth = BIO_meth_new(0x666, "ha QUIC methods");
xprt_register(XPRT_QUIC, &ssl_quic);
}
+INITCALL0(STG_REGISTER, __quic_conn_init);
-__attribute__((destructor))
static void __quic_conn_deinit(void)
{
BIO_meth_free(ha_quic_meth);
}
+REGISTER_POST_DEINIT(__quic_conn_deinit);
/* Read all the QUIC packets found in <buf> from QUIC connection with <owner>
* as owner calling <func> function.