From 9347a55e3e3f0488ca8351b029dc19952fc3c922 Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Wed, 22 Nov 2023 16:57:38 -0500 Subject: [PATCH] Fix ROMIO use of PATH_MAX. We need to discover the existence and then include sys/param.h while using the correctly named MPL defines. Fixes #12108 Signed-off-by: George Bosilca --- 3rd-party/romio341/mpl/configure.ac | 2 +- 3rd-party/romio341/mpl/src/str/mpl_str.c | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/3rd-party/romio341/mpl/configure.ac b/3rd-party/romio341/mpl/configure.ac index 4812d8a30dc..5c271f5d6f8 100644 --- a/3rd-party/romio341/mpl/configure.ac +++ b/3rd-party/romio341/mpl/configure.ac @@ -138,7 +138,7 @@ if test "$pac_cv_have___typeof" = "yes" ; then fi dnl Check if the necessary headers are available -AC_CHECK_HEADERS(stdio.h stdlib.h string.h stdarg.h ctype.h sys/types.h sys/uio.h execinfo.h unistd.h errno.h windows.h sys/mman.h) +AC_CHECK_HEADERS(stdio.h stdlib.h string.h stdarg.h ctype.h sys/types.h sys/uio.h execinfo.h unistd.h errno.h windows.h sys/mman.h sys/param.h) # A C99 compliant compiler should have inttypes.h for fixed-size int types AC_CHECK_HEADERS(inttypes.h stdint.h) diff --git a/3rd-party/romio341/mpl/src/str/mpl_str.c b/3rd-party/romio341/mpl/src/str/mpl_str.c index 925793dec64..0704b22ea83 100644 --- a/3rd-party/romio341/mpl/src/str/mpl_str.c +++ b/3rd-party/romio341/mpl/src/str/mpl_str.c @@ -6,15 +6,19 @@ #include "mpl.h" #include -#ifdef HAVE_UNISTD_H +#ifdef MPL_HAVE_UNISTD_H #include #endif -#ifdef HAVE_SYS_TYPES_H +#ifdef MPL_HAVE_SYS_TYPES_H #include #endif -#ifdef HAVE_TIME_H +#ifdef MPL_HAVE_SYS_PARAM_H +#include +#endif + +#ifdef MPL_HAVE_TIME_H #include #endif