Skip to content

Commit fbea826

Browse files
committed
gcc13 does not define SSIZE_MAX
Manually define it based on the length of the ssize_t type. Fixes #12109 Signed-off-by: George Bosilca <bosilca@icl.utk.edu>
1 parent bbc317f commit fbea826

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

opal/include/opal_config_bottom.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* and Technology (RIST). All rights reserved.
1818
* Copyright (c) 2015-2017 Intel, Inc. All rights reserved.
1919
* Copyright (c) 2021 FUJITSU LIMITED. All rights reserved.
20+
* Copyright (c) 2023 NVIDIA Corporation. All rights reserved.
2021
* $COPYRIGHT$
2122
*
2223
* Additional copyrights may follow
@@ -568,6 +569,17 @@ typedef struct {
568569
} opal_short_float_complex_t;
569570
# endif
570571

572+
/* gcc 13 does not define SSIZE_MAX as required by the POSIX standard.
573+
* As a workaround we define ours.
574+
*/
575+
#ifndef SSIZE_MAX
576+
# if SIZEOF_SSIZE_T == SIZEOF_LONG
577+
# define SSIZE_MAX LONG_MAX
578+
# elif SIZEOF_SSIZE_T == SIZEOF_LONG_LONG
579+
# define SSIZE_MAX LONG_LONG_MAX
580+
# endif
581+
#endif
582+
571583
#else
572584

573585
/* For a similar reason to what is listed in opal_config_top.h, we

0 commit comments

Comments
 (0)