From e0aa41ad01ebdd2dd4ba3872027cad83577ca821 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Baumbach?= Date: Fri, 8 Aug 2025 17:31:34 +0200 Subject: [PATCH] third_party: fix libquic build on older systems MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BUG: https://bugzilla.samba.org/show_bug.cgi?id=15896 Pair-Programmed-With: Stefan Metzmacher Signed-off-by: Björn Baumbach Signed-off-by: Stefan Metzmacher Reviewed-by: Stefan Metzmacher (cherry picked from commit 149933854f39b4628b14abc5dcd57e73e2a0a637) --- third_party/quic/libquic_handshake_wrapper.c | 2 ++ third_party/quic/wscript | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 third_party/quic/libquic_handshake_wrapper.c diff --git a/third_party/quic/libquic_handshake_wrapper.c b/third_party/quic/libquic_handshake_wrapper.c new file mode 100644 index 00000000000..3590eee5e11 --- /dev/null +++ b/third_party/quic/libquic_handshake_wrapper.c @@ -0,0 +1,2 @@ +#include "replace.h" +#include "libquic/handshake.c" diff --git a/third_party/quic/wscript b/third_party/quic/wscript index 3715e35e022..ab5cceab70b 100644 --- a/third_party/quic/wscript +++ b/third_party/quic/wscript @@ -19,6 +19,12 @@ def configure(conf): conf.SET_TARGET_TYPE('quic', 'EMPTY') return + if not conf.CHECK_DECLS('TLS_CIPHER_AES_GCM_256', headers='linux/tls.h'): + conf.DEFINE('TLS_CIPHER_AES_GCM_256', 52) + + if not conf.CHECK_DECLS('TLS_CIPHER_AES_CCM_128', headers='linux/tls.h'): + conf.DEFINE('TLS_CIPHER_AES_CCM_128', 53) + if not conf.CHECK_DECLS('TLS_CIPHER_CHACHA20_POLY1305', headers='linux/tls.h'): conf.DEFINE('TLS_CIPHER_CHACHA20_POLY1305', 54) @@ -46,7 +52,7 @@ def build(bld): bld.SAMBA_LIBRARY('quic', source=''' - libquic/handshake.c + libquic_handshake_wrapper.c ''', includes='libquic modules/include/uapi', deps='replace', -- 2.43.0