From 80bb41a079f1c5bf6350cd7188559ea5c47152b7 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) Signed-off-by: Rob Latham Signed-off-by: Nathan Hjelm --- ompi/mca/io/romio314/romio/configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ompi/mca/io/romio314/romio/configure.ac b/ompi/mca/io/romio314/romio/configure.ac index 4fc60552c6..7492b816e8 100644 --- a/ompi/mca/io/romio314/romio/configure.ac +++ b/ompi/mca/io/romio314/romio/configure.ac @@ -1720,7 +1720,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