Skip to content

Commit

Permalink
gcc13 on OSX fails to include the system limits.
Browse files Browse the repository at this point in the history
The only way to get IOV_MAX (and friends) is to manually include the GCC specific
syslimits.h header (sys/syslimits.h would not work either).

Fixes #12110

Signed-off-by: George Bosilca <bosilca@icl.utk.edu>
(cherry picked from commit bbc317f)
  • Loading branch information
bosilca committed Jan 23, 2024
1 parent 20b79bf commit 9bd6041
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ AC_CHECK_HEADERS([alloca.h aio.h arpa/inet.h dirent.h \
sys/types.h sys/uio.h sys/un.h net/uio.h sys/utsname.h sys/vfs.h sys/wait.h syslog.h \
termios.h ulimit.h unistd.h util.h utmp.h malloc.h \
ifaddrs.h crt_externs.h regex.h mntent.h paths.h \
ioLib.h sockLib.h hostLib.h shlwapi.h sys/synch.h db.h ndbm.h ieee754.h])
ioLib.h sockLib.h hostLib.h shlwapi.h sys/synch.h db.h ndbm.h ieee754.h syslimits.h])

AC_CHECK_HEADERS([sys/mount.h], [], [],
[AC_INCLUDES_DEFAULT
Expand Down
4 changes: 4 additions & 0 deletions ompi/mca/fbtl/posix/fbtl_posix_preadv.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* Copyright (c) 2015-2018 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2023 Jeffrey M. Squyres. All rights reserved.
* Copyright (c) 2023 NVIDIA Corporation. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand All @@ -26,6 +27,9 @@
#include "mpi.h"
#include <unistd.h>
#include <limits.h>
#ifdef HAVE_SYSLIMITS_H
#include <syslimits.h>
#endif /* HAVE_SYSLIMITS_H */
#include "ompi/constants.h"
#include "ompi/mca/fbtl/fbtl.h"

Expand Down
5 changes: 4 additions & 1 deletion ompi/mca/fbtl/posix/fbtl_posix_pwritev.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* Copyright (c) 2008-2021 University of Houston. All rights reserved.
* Copyright (c) 2015-2018 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2023 NVIDIA Corporation. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand All @@ -25,8 +26,10 @@

#include "mpi.h"
#include <unistd.h>
#include <sys/uio.h>
#include <limits.h>
#ifdef HAVE_SYSLIMITS_H
#include <syslimits.h>
#endif /* HAVE_SYSLIMITS_H */
#include "ompi/constants.h"
#include "ompi/mca/fbtl/fbtl.h"

Expand Down

0 comments on commit 9bd6041

Please sign in to comment.