Skip to content

Commit f8adf54

Browse files
wthrowehjelmn
authored andcommitted
ROMIO configure looks for lstat in wrong header
ROMIO configure looks for lstat in wrong header The ROMIO configure script checks for a declaration of lstat in unistd.h, but, at least on the Linux machines I checked, lstat is in sys/stat.h. (The detection failure led to a linker error when building ROMIO as part of OpenMPI on one of my admittedly strangely configured machines, somehow.) It appears from the man page that either location is possible, so check both. (cherry picked from mpich/mpich@7b8bd055dfdeb) Signed-off-by: Rob Latham <[email protected]> Signed-off-by: Nathan Hjelm <[email protected]> (cherry picked from open-mpi/ompi@80bb41a)
1 parent 2ae0f3b commit f8adf54

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ompi/mca/io/romio314/romio/configure.ac

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1720,7 +1720,8 @@ fi
17201720
AC_CHECK_FUNCS(lstat)
17211721
if test "$ac_cv_func_lstat" = "yes" ; then
17221722
# Do we need to declare lstat?
1723-
PAC_FUNC_NEEDS_DECL([#include <unistd.h>],lstat)
1723+
PAC_FUNC_NEEDS_DECL([#include <unistd.h>
1724+
#include <sys/stat.h>],lstat)
17241725
fi
17251726
AC_CHECK_FUNCS(readlink)
17261727
if test "$ac_cv_func_readlink" = "yes" ; then

0 commit comments

Comments
 (0)