Browse Source

Use autoconf glue around new my_is_symlink to avoid stat(2) and friends

being used on systems which don't support that interface.
pull/374/head
Jonathan Perkin 18 years ago
committed by mysqldev
parent
commit
befef397b4
  1. 4
      mysys/my_symlink.c

4
mysys/my_symlink.c

@ -109,8 +109,12 @@ int my_symlink(const char *content, const char *linkname, myf MyFlags)
int my_is_symlink(const char *filename __attribute__((unused)))
{
#if defined(HAVE_REALPATH) && !defined(HAVE_purify) && !defined(HAVE_BROKEN_REALPATH)
struct stat stat_buff;
return !lstat(filename, &stat_buff) && S_ISLNK(stat_buff.st_mode);
#else
return 0;
#endif
}

Loading…
Cancel
Save