From 460851ace3417b63eee5b093471be3a3461220f6 Mon Sep 17 00:00:00 2001 From: Geoff Martin Date: Tue, 30 Apr 2024 16:35:34 +0100 Subject: [PATCH] Exported the ddsrt_getifaddrs and ddsrt_freeifaddrs symbols which are required by the Iceoryx PSMX plugin. --- src/core/xtests/symbol_export/symbol_export.c | 5 +++++ src/ddsrt/include/dds/ddsrt/ifaddrs.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/core/xtests/symbol_export/symbol_export.c b/src/core/xtests/symbol_export/symbol_export.c index a6ef6a4970..8eaa18730a 100644 --- a/src/core/xtests/symbol_export/symbol_export.c +++ b/src/core/xtests/symbol_export/symbol_export.c @@ -36,6 +36,7 @@ #include "dds/ddsrt/strtol.h" #include "dds/ddsrt/xmlparser.h" #include "dds/ddsrt/io.h" +#include "dds/ddsrt/ifaddrs.h" #if DDSRT_HAVE_FILESYSTEM #include "dds/ddsrt/filesystem.h" #endif @@ -1069,6 +1070,10 @@ int main (int argc, char **argv) test_ddsrt_vasprintf (ptr, " "); ddsrt_asprintf (ptr, " "); + // ddsrt/ifaddrs.h + ddsrt_getifaddrs (ptr, ptr); + ddsrt_freeifaddrs (ptr); + // dds__write.h dds_write_impl (ptr, ptr, 0, (dds_write_action) 0); dds_writecdr_impl (ptr, ptr, ptr, false); diff --git a/src/ddsrt/include/dds/ddsrt/ifaddrs.h b/src/ddsrt/include/dds/ddsrt/ifaddrs.h index e131f4c3ab..50b73468ee 100644 --- a/src/ddsrt/include/dds/ddsrt/ifaddrs.h +++ b/src/ddsrt/include/dds/ddsrt/ifaddrs.h @@ -58,7 +58,7 @@ typedef struct ddsrt_ifaddrs ddsrt_ifaddrs_t; * @param[in] afs an array of address families * @return a DDS_RETCODE (OK, ERROR, OUT_OF_RESOURCES, NOT_ALLOWED) */ -dds_return_t +DDS_EXPORT dds_return_t ddsrt_getifaddrs( ddsrt_ifaddrs_t **ifap, const int *afs); @@ -68,7 +68,7 @@ ddsrt_getifaddrs( * * @param[in] ifa the interface addresses to free */ -void +DDS_EXPORT void ddsrt_freeifaddrs( ddsrt_ifaddrs_t *ifa);