Skip to content

Commit

Permalink
Fix ROMIO use of PATH_MAX.
Browse files Browse the repository at this point in the history
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 <bosilca@icl.utk.edu>
(cherry picked from commit 9347a55)
  • Loading branch information
bosilca committed Jan 23, 2024
1 parent 08f21fd commit 8270814
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion 3rd-party/romio341/mpl/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 7 additions & 3 deletions 3rd-party/romio341/mpl/src/str/mpl_str.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@
#include "mpl.h"
#include <assert.h>

#ifdef HAVE_UNISTD_H
#ifdef MPL_HAVE_UNISTD_H
#include <unistd.h>
#endif

#ifdef HAVE_SYS_TYPES_H
#ifdef MPL_HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif

#ifdef HAVE_TIME_H
#ifdef MPL_HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif

#ifdef MPL_HAVE_TIME_H
#include <time.h>
#endif

Expand Down

0 comments on commit 8270814

Please sign in to comment.