summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/standard/link.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/standard/link.c b/ext/standard/link.c
index 0d1aabfdcd..0730c4f9b6 100644
--- a/ext/standard/link.c
+++ b/ext/standard/link.c
@@ -146,7 +146,11 @@ PHP_FUNCTION(symlink)
RETURN_FALSE;
}
+#ifndef ZTS
ret = symlink(Z_STRVAL_PP(topath), Z_STRVAL_PP(frompath));
+#else
+ ret = symlink(dest_p, source_p);
+#endif
if (ret == -1) {
php_error(E_WARNING, "Symlink failed (%s)", strerror(errno));
RETURN_FALSE;
@@ -197,7 +201,11 @@ PHP_FUNCTION(link)
RETURN_FALSE;
}
+#ifndef ZTS
ret = link(Z_STRVAL_PP(topath), Z_STRVAL_PP(frompath));
+#else
+ ret = link(dest_p, source_p);
+#endif
if (ret == -1) {
php_error(E_WARNING, "Link failed (%s)", strerror(errno));
RETURN_FALSE;