From 1cf1aa879b7a1c6e1ffb61d4ec4961ac0543ba1b Mon Sep 17 00:00:00 2001 From: William Throwe Date: Mon, 14 Sep 2015 23:09:51 -0400 Subject: [PATCH] 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) (cherry picked from open-mpi/ompi@80bb41a079f1c5bf6350cd7188559ea5c47152b7) Signed-off-by: Rob Latham Signed-off-by: Nathan Hjelm --- ompi/mca/io/romio/romio/configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ompi/mca/io/romio/romio/configure.ac b/ompi/mca/io/romio/romio/configure.ac index 06ddd92e4b..dbea260b34 100644 --- a/ompi/mca/io/romio/romio/configure.ac +++ b/ompi/mca/io/romio/romio/configure.ac @@ -2054,7 +2054,8 @@ fi AC_CHECK_FUNCS(lstat) if test "$ac_cv_func_lstat" = "yes" ; then # Do we need to declare lstat? - PAC_FUNC_NEEDS_DECL([#include ],lstat) + PAC_FUNC_NEEDS_DECL([#include + #include ],lstat) fi AC_CHECK_FUNCS(readlink) if test "$ac_cv_func_readlink" = "yes" ; then