diff --git a/include/ompi_stdint.h b/include/ompi_stdint.h index 5cace1007e..6fc7e14226 100644 --- a/include/ompi_stdint.h +++ b/include/ompi_stdint.h @@ -34,6 +34,7 @@ /* * Include what we can and define what is missing. */ +#include #ifdef HAVE_INTTYPES_H #include @@ -182,6 +183,18 @@ typedef unsigned long long uintptr_t; #endif +/* fix up some constants that may be missing */ +#ifndef SIZE_MAX +#if SIZEOF_VOID_P == SIZEOF_INT +#define SIZE_MAX UINT_MAX +#elif SIZEOF_VOID_P == SIZEOF_LONG +#define SIZE_MAX ULONG_MAX +#else +#error Failed to find value for SIZE_MAX +#endif + +#endif /* ifndef SIZE_MAX */ + #endif /* HAVE_STDINT_H */ #endif /* OMPI_STDINT_H */ diff --git a/orte/mca/gpr/base/gpr_base_open.c b/orte/mca/gpr/base/gpr_base_open.c index 91422f3ebd..db5159bde4 100644 --- a/orte/mca/gpr/base/gpr_base_open.c +++ b/orte/mca/gpr/base/gpr_base_open.c @@ -17,8 +17,9 @@ */ #include "orte_config.h" + #include "orte/include/orte_constants.h" -\ + #include "opal/util/output.h" #include "opal/util/trace.h" diff --git a/orte/mca/oob/base/base.h b/orte/mca/oob/base/base.h index 8d03c113ad..bb5937dec8 100644 --- a/orte/mca/oob/base/base.h +++ b/orte/mca/oob/base/base.h @@ -25,6 +25,10 @@ #include "orte_config.h" +#ifdef HAVE_UNISTD_H +#include +#endif + #include "dps/dps_types.h" #include "mca/mca.h" #include "mca/ns/ns_types.h" diff --git a/orte/mca/oob/base/oob_base_ping.c b/orte/mca/oob/base/oob_base_ping.c index c356752a87..0cff6b461a 100644 --- a/orte/mca/oob/base/oob_base_ping.c +++ b/orte/mca/oob/base/oob_base_ping.c @@ -24,6 +24,9 @@ #ifdef HAVE_NETINET_IN_H #include #endif +#ifdef HAVE_UNISTD_H +#include +#endif #include "include/constants.h" #include "opal/util/argv.h" diff --git a/orte/mca/oob/oob.h b/orte/mca/oob/oob.h index 3d62be088f..690cc9305d 100644 --- a/orte/mca/oob/oob.h +++ b/orte/mca/oob/oob.h @@ -25,6 +25,10 @@ #include "ompi_config.h" +#ifdef HAVE_UNISTD_H +#include +#endif + #include "include/types.h" #include "mca/mca.h" diff --git a/orte/mca/rml/rml.h b/orte/mca/rml/rml.h index 7d7f1b5849..c108d4d647 100644 --- a/orte/mca/rml/rml.h +++ b/orte/mca/rml/rml.h @@ -24,6 +24,11 @@ #define ORTE_RML_H_ #include "orte_config.h" + +#ifdef HAVE_UNISTD_H +#include +#endif + #include "include/orte_constants.h" #include "mca/mca.h"