Index: include/ompi_stdint.h
===================================================================
--- include/ompi_stdint.h	(revision 8360)
+++ include/ompi_stdint.h	(revision 8361)
@@ -34,6 +34,7 @@
 /*
  * Include what we can and define what is missing.
  */
+#include <limits.h>

 #ifdef HAVE_INTTYPES_H
 #include <inttypes.h>
@@ -182,6 +183,18 @@

 #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 */
Index: orte/mca/oob/oob.h
===================================================================
--- orte/mca/oob/oob.h	(revision 8360)
+++ orte/mca/oob/oob.h	(revision 8361)
@@ -25,6 +25,10 @@

 #include "ompi_config.h"

+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
 #include "include/types.h"
 #include "mca/mca.h"

Index: orte/mca/oob/base/base.h
===================================================================
--- orte/mca/oob/base/base.h	(revision 8360)
+++ orte/mca/oob/base/base.h	(revision 8361)
@@ -25,6 +25,10 @@

 #include "orte_config.h"

+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
 #include "dps/dps_types.h"
 #include "mca/mca.h"
 #include "mca/ns/ns_types.h"
Index: orte/mca/oob/base/oob_base_ping.c
===================================================================
--- orte/mca/oob/base/oob_base_ping.c	(revision 8360)
+++ orte/mca/oob/base/oob_base_ping.c	(revision 8361)
@@ -24,6 +24,9 @@
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif

 #include "include/constants.h"
 #include "opal/util/argv.h"
Index: orte/mca/gpr/base/gpr_base_open.c
===================================================================
--- orte/mca/gpr/base/gpr_base_open.c	(revision 8360)
+++ orte/mca/gpr/base/gpr_base_open.c	(revision 8361)
@@ -17,8 +17,9 @@
  */

 #include "orte_config.h"
+
 #include "orte/include/orte_constants.h"
-\
+
 #include "opal/util/output.h"
 #include "opal/util/trace.h"

Index: orte/mca/rml/rml.h
===================================================================
--- orte/mca/rml/rml.h	(revision 8360)
+++ orte/mca/rml/rml.h	(revision 8361)
@@ -24,6 +24,11 @@
 #define ORTE_RML_H_

 #include "orte_config.h"
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
 #include "include/orte_constants.h"

 #include "mca/mca.h"
