diff --git a/opal/mca/base/mca_base_component_find.c b/opal/mca/base/mca_base_component_find.c index 10e094126c..b69bbd2c27 100644 --- a/opal/mca/base/mca_base_component_find.c +++ b/opal/mca/base/mca_base_component_find.c @@ -24,6 +24,9 @@ #include #include #include +#ifdef HAVE_SYS_PARAM_H +#include +#endif #if OMPI_WANT_LIBLTDL #include "opal/libltdl/ltdl.h" @@ -186,7 +189,7 @@ int mca_base_component_find(const char *directory, const char *type, } if (opal_list_get_end(found_components) == item) { - char h[HOST_NAME_MAX]; + char h[MAXHOSTNAMELEN]; gethostname(h, sizeof(h)); opal_show_help("help-mca-base.txt", "find-available:not-valid", true,