From f7aedf01340c1fff4ef42f8f2b4638ca00f05878 Mon Sep 17 00:00:00 2001 From: Kenneth Cain Date: Tue, 5 Jan 2021 20:40:28 -0500 Subject: [PATCH] romio/daos: better conditionals to build with libdaos.so.0/1 Enhance the conditional compilation logic in the daos adio driver for compiling against libdaos.so.0 (old API) that does not provide a DAOS_API_MAJOR_VERSION preprocessor macro. Signed-off-by: Kenneth Cain --- src/mpi/romio/adio/ad_daos/ad_daos_hhash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mpi/romio/adio/ad_daos/ad_daos_hhash.c b/src/mpi/romio/adio/ad_daos/ad_daos_hhash.c index b2d93e8aa4b..361223b64b5 100644 --- a/src/mpi/romio/adio/ad_daos/ad_daos_hhash.c +++ b/src/mpi/romio/adio/ad_daos/ad_daos_hhash.c @@ -148,7 +148,7 @@ int adio_daos_poh_lookup_connect(uuid_t uuid, struct adio_daos_hdl **hdl) char *group = NULL; daos_pool_info_t pool_info; -#if DAOS_API_VERSION_MAJOR < 1 +#if !defined(DAOS_API_VERSION_MAJOR) || (defined(DAOS_API_VERSION_MAJOR) && (DAOS_API_VERSION_MAJOR < 1)) /** Get the SVCL and Server group from env variables. This is temp as those * won't be needed later */ char *svcl_str = NULL; @@ -166,7 +166,7 @@ int adio_daos_poh_lookup_connect(uuid_t uuid, struct adio_daos_hdl **hdl) #endif group = getenv("DAOS_GROUP"); -#if DAOS_API_VERSION_MAJOR < 1 +#if !defined(DAOS_API_VERSION_MAJOR) || (defined(DAOS_API_VERSION_MAJOR) && (DAOS_API_VERSION_MAJOR < 1)) rc = daos_pool_connect(uuid, group, svcl, DAOS_PC_RW, &phdl->open_hdl, &pool_info, NULL); d_rank_list_free(svcl); #else