diff --git a/ompi/mca/fs/base/base.h b/ompi/mca/fs/base/base.h index 80b9ca2b4ac..d19c61cd7e6 100644 --- a/ompi/mca/fs/base/base.h +++ b/ompi/mca/fs/base/base.h @@ -43,9 +43,6 @@ #ifdef HAVE_SYS_PARAM_H #include #endif -#ifdef HAVE_SYS_MOUNT_H -#include -#endif #ifdef HAVE_SYS_STAT_H #include #endif diff --git a/ompi/mca/fs/base/fs_base_get_parent_dir.c b/ompi/mca/fs/base/fs_base_get_parent_dir.c index db9fc65180d..a1003415ce2 100644 --- a/ompi/mca/fs/base/fs_base_get_parent_dir.c +++ b/ompi/mca/fs/base/fs_base_get_parent_dir.c @@ -35,6 +35,14 @@ #include "ompi/mca/fs/base/base.h" #include "ompi/mca/common/ompio/common_ompio.h" +/* + * Be careful moving this include. + * It's easy to hit problems similar to that reported in + * https://github.com/systemd/systemd/issues/8507 + */ +#ifdef HAVE_SYS_MOUNT_H +#include +#endif void mca_fs_base_get_parent_dir ( char *filename, char **dirnamep) {