Skip to content

Commit d2af1d7

Browse files
committed
move include of sys/mount back to where it was
Turns out the sys/mount.h can be tricky to use because various other system include files sometimes redefine some of the symbols in this include file, leading to compile failures. Careful ordering of include files may solve the problem, but here it simpler just to move the include of sys/mount.h back to its original location. related to #12181 Signed-off-by: Howard Pritchard <[email protected]>
1 parent e6a294b commit d2af1d7

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

ompi/mca/fs/base/base.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@
4343
#ifdef HAVE_SYS_PARAM_H
4444
#include <sys/param.h>
4545
#endif
46-
#ifdef HAVE_SYS_MOUNT_H
47-
#include <sys/mount.h>
48-
#endif
4946
#ifdef HAVE_SYS_STAT_H
5047
#include <sys/stat.h>
5148
#endif

ompi/mca/fs/base/fs_base_get_parent_dir.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@
3535
#include "ompi/mca/fs/base/base.h"
3636
#include "ompi/mca/common/ompio/common_ompio.h"
3737

38+
/*
39+
* Be careful moving this include.
40+
* It's easy to hit problems similar to that reported in
41+
* https://github.com/systemd/systemd/issues/8507
42+
*/
43+
#ifdef HAVE_SYS_MOUNT_H
44+
#include <sys/mount.h>
45+
#endif
3846

3947
void mca_fs_base_get_parent_dir ( char *filename, char **dirnamep)
4048
{

0 commit comments

Comments
 (0)