diff --git a/configure.ac b/configure.ac index 7737d178a..8030e6ae8 100644 --- a/configure.ac +++ b/configure.ac @@ -186,6 +186,7 @@ AC_CHECK_FUNCS([ctime_r usleep]) # BSD AC_CHECK_LIB([socket], [connect]) +AC_CHECK_FUNCS([lstat]) # Non-standard diff --git a/polyp/util.c b/polyp/util.c index f1f4b2c59..b2f61d575 100644 --- a/polyp/util.c +++ b/polyp/util.c @@ -139,10 +139,10 @@ int pa_make_secure_dir(const char* dir) { if (errno != EEXIST) return -1; -#ifdef OS_IS_WIN32 - if (stat(dir, &st) < 0) -#else +#ifdef HAVE_LSTAT if (lstat(dir, &st) < 0) +#else + if (stat(dir, &st) < 0) #endif goto fail;