diff --git a/config/m4/ucx.m4 b/config/m4/ucx.m4 index 14d64be785..fa608685cd 100644 --- a/config/m4/ucx.m4 +++ b/config/m4/ucx.m4 @@ -1,5 +1,5 @@ # -# Copyright (c) 2001-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2001-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # See file LICENSE for terms. # @@ -118,6 +118,16 @@ AS_IF([test "x$ucx_checked" != "xyes"],[ [AC_DEFINE([UCS_HAVE_RCACHE_REGION_ALIGNMENT], [1], [flags for ucs_rcache_get])], [], [#include ]) + + + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include + int main(int argc, char** argv) { + ucs_config_parser_set_value(NULL, NULL, NULL, NULL, NULL); + return 0; + } ]])], + [AC_DEFINE([UCS_HAVE_PARSER_SET_VALUE_TABLE_PREFIX], [1], [flags for ucs_rcache_get])], + []) + ], [ AS_IF([test "x$with_ucx" != "xguess"], diff --git a/src/utils/ucc_parser.h b/src/utils/ucc_parser.h index dd0869c66d..f8bd2e7ede 100644 --- a/src/utils/ucc_parser.h +++ b/src/utils/ucc_parser.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2020-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * Copyright (c) 2020-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * * See file LICENSE for terms. */ @@ -168,8 +168,13 @@ static inline ucc_status_t ucc_config_parser_set_value(void *opts, ucc_config_field_t *fields, const char *name, const char *value) { - ucs_status_t status = - ucs_config_parser_set_value(opts, fields, name, value); + ucs_status_t status; + +#if UCS_HAVE_PARSER_SET_VALUE_TABLE_PREFIX + status = ucs_config_parser_set_value(opts, fields, NULL, name, value); +#else + status = ucs_config_parser_set_value(opts, fields, name, value); +#endif return ucs_status_to_ucc_status(status); }