Browse Source

improve detection of scandir

Nathalie Furmento 6 years ago
parent
commit
3df2abcec6
2 changed files with 2 additions and 1 deletions
  1. 1 0
      configure.ac
  2. 1 1
      src/core/perfmodel/perfmodel_history.c

+ 1 - 0
configure.ac

@@ -789,6 +789,7 @@ AC_SEARCH_LIBS([sqrt],[m],,AC_MSG_ERROR([math library unavailable]))
 AC_HAVE_LIBRARY([ws2_32])
 AC_CHECK_FUNCS([sysconf])
 AC_CHECK_FUNCS([getrlimit])
+AC_CHECK_FUNCS([scandir])
 
 AC_CHECK_FUNC([pthread_spin_lock], have_pthread_spin_lock=yes, have_pthread_spin_lock=no)
 if test x$have_pthread_spin_lock = xyes; then

+ 1 - 1
src/core/perfmodel/perfmodel_history.c

@@ -1408,7 +1408,7 @@ void starpu_perfmodel_directory(FILE *output)
  * the performance model files */
 int starpu_perfmodel_list(FILE *output)
 {
-#if !defined(_WIN32) || defined(__MINGW32__) || defined(__CYGWIN__)
+#ifdef HAVE_SCANDIR
         char *path;
 	struct dirent **list;
 	int n;