summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2007-06-05 12:02:46 +0000
committerAntony Dovgal <tony2001@php.net>2007-06-05 12:02:46 +0000
commitcf53dfaff3c3e71afa319af92168ed106acbb93e (patch)
treed2db0feeb78271c6b337bcc47e20d5108de1a59e /ext
parent7a0383843032f987534312b3a36dac958090ff40 (diff)
downloadphp-git-cf53dfaff3c3e71afa319af92168ed106acbb93e.tar.gz
MFH
Diffstat (limited to 'ext')
-rwxr-xr-xext/spl/spl_directory.c4
1 files changed, 4 insertions, 0 deletions
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));