In commit
4e057440520c1 I used lstat instead of stat confusing the
two. The commit tried to fix the misidentification of directories.
There is no need to distinquish between symlinks and files (and
thus break it if a binary is a symlink).
Change-Id: Ie964e826729a35f11516fb3d002ebc01cbb7a564
check_function_exists(_fileno HAVE__FILENO)
check_function_exists(fileno HAVE_FILENO)
check_function_exists(_commit HAVE__COMMIT)
-check_function_exists(lstat HAVE_LSTAT)
include(CheckLibraryExists)
check_library_exists(m sqrt "" HAVE_LIBM)
/* Define to 1 if you have the _fileno() function. */
#cmakedefine HAVE__FILENO
-/* Define to 1 if you have the lstat() function. */
-#cmakedefine HAVE_LSTAT
-
/* Define to 1 if you have the <string.h> header file. */
#cmakedefine HAVE_STRING_H
{
int status;
struct stat st_buf;
- #ifdef HAVE_LSTAT
- status = lstat (fname, &st_buf);
- #else
- status = stat (fname, &st_buf);
- #endif
+ status = stat (fname, &st_buf);
if (status != 0 || !S_ISREG(st_buf.st_mode))
{
return FALSE;