Use stat if lstat is not available

This commit is contained in:
Dominik Schmidt 2012-02-20 18:27:23 +01:00 committed by Andreas Schneider
parent da286857e0
commit 6272a2b485
3 changed files with 8 additions and 0 deletions

View file

@ -50,4 +50,6 @@ check_function_exists(strerror_r HAVE_STRERROR_R)
check_function_exists(utimes HAVE_UTIMES)
check_function_exists(lstat HAVE_LSTAT)
set(CSYNC_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CACHE INTERNAL "csync required system libraries")

View file

@ -13,3 +13,4 @@
#cmakedefine WITH_LOG4C 1
#cmakedefine HAVE_STRERROR_R
#cmakedefine HAVE_UTIMES
#cmakedefine HAVE_LSTAT

View file

@ -47,5 +47,10 @@
#define strerror_r(errnum, buf, buflen) snprintf(buf, buflen, "%s", strerror(errnum))
#endif
#ifndef HAVE_LSTAT
#define lstat _stat
#endif
#endif //_C_PRIVATE_H
/* vim: set ft=c.doxygen ts=8 sw=2 et cindent: */