Skip to content

Commit

Permalink
BUILD: fix ucs parser set value (openucx#895)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergei-Lebedev authored and janjust committed Jan 31, 2024
1 parent 60936c4 commit 4f34178
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
12 changes: 11 additions & 1 deletion config/m4/ucx.m4
Original file line number Diff line number Diff line change
@@ -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.
#

Expand Down Expand Up @@ -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 <ucs/memory/rcache.h>])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <ucs/config/parser.h>
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"],
Expand Down
11 changes: 8 additions & 3 deletions src/utils/ucc_parser.h
Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 4f34178

Please sign in to comment.