From: Antony Dovgal Date: Tue, 5 Jun 2007 12:02:46 +0000 (+0000) Subject: MFH X-Git-Tag: php-5.2.4RC1~420 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cf53dfaff3c3e71afa319af92168ed106acbb93e;p=php MFH --- diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index 07cf43e4b4..b9fc22dfdd 100755 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -829,7 +829,11 @@ SPL_METHOD(SplFileInfo, getLinkTarget) php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); +#ifdef HAVE_SYMLINK ret = readlink(intern->file_name, buff, MAXPATHLEN-1); +#else + ret = -1; /* always fail if not implemented */ +#endif if (ret == -1) { zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Unable to read link %s, error: %s", intern->file_name, strerror(errno));