aboutsummaryrefslogtreecommitdiff
path: root/src/sp/transport/udp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp/transport/udp')
-rw-r--r--src/sp/transport/udp/CMakeLists.txt10
-rw-r--r--src/sp/transport/udp/udp.c8
2 files changed, 13 insertions, 5 deletions
diff --git a/src/sp/transport/udp/CMakeLists.txt b/src/sp/transport/udp/CMakeLists.txt
index b08cd861..391888fe 100644
--- a/src/sp/transport/udp/CMakeLists.txt
+++ b/src/sp/transport/udp/CMakeLists.txt
@@ -1,5 +1,5 @@
#
-# Copyright 2024 Staysail Systems, Inc. <info@staysail.tech>
+# Copyright 2025 Staysail Systems, Inc. <info@staysail.tech>
#
# This software is supplied under the terms of the MIT License, a
# copy of which should be located in the distribution where this
@@ -10,6 +10,8 @@
# UDP transport
nng_directory(udp)
-nng_sources_if(NNG_TRANSPORT_UDP udp.c)
-nng_defines_if(NNG_TRANSPORT_UDP NNG_TRANSPORT_UDP)
-nng_test_if(NNG_TRANSPORT_UDP udp_tran_test)
+if (NNG_TRANSPORT_UDP)
+ nng_sources(udp.c)
+ nng_defines(NNG_TRANSPORT_UDP)
+ nng_test(udp_tran_test)
+endif()
diff --git a/src/sp/transport/udp/udp.c b/src/sp/transport/udp/udp.c
index 0aa46767..e19a5684 100644
--- a/src/sp/transport/udp/udp.c
+++ b/src/sp/transport/udp/udp.c
@@ -1756,8 +1756,14 @@ udp_ep_accept(void *arg, nni_aio *aio)
nni_mtx_unlock(&ep->mtx);
}
+static size_t
+udp_pipe_size(void)
+{
+ return (sizeof(udp_pipe));
+}
+
static nni_sp_pipe_ops udp_pipe_ops = {
- .p_size = sizeof(udp_pipe),
+ .p_size = udp_pipe_size,
.p_init = udp_pipe_init,
.p_fini = udp_pipe_fini,
.p_stop = udp_pipe_stop,