Use autoconf glue around new my_is_symlink to avoid stat(2) and friends
being used on systems which don't support that interface.
This commit is contained in:
parent
4c78c6f7bf
commit
403c3e6f2e
@ -109,8 +109,12 @@ int my_symlink(const char *content, const char *linkname, myf MyFlags)
|
|||||||
|
|
||||||
int my_is_symlink(const char *filename __attribute__((unused)))
|
int my_is_symlink(const char *filename __attribute__((unused)))
|
||||||
{
|
{
|
||||||
|
#if defined(HAVE_REALPATH) && !defined(HAVE_purify) && !defined(HAVE_BROKEN_REALPATH)
|
||||||
struct stat stat_buff;
|
struct stat stat_buff;
|
||||||
return !lstat(filename, &stat_buff) && S_ISLNK(stat_buff.st_mode);
|
return !lstat(filename, &stat_buff) && S_ISLNK(stat_buff.st_mode);
|
||||||
|
#else
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user