summaryrefslogtreecommitdiffstats
path: root/main/php/php-fix-crypt.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-06-25 14:05:30 +0300
committerTimo Teräs <timo.teras@iki.fi>2014-06-25 14:06:27 +0300
commit881d55a53a111ea06854f4596266c3b044f5eb53 (patch)
tree37ab8a8819ef06656608c0fbefbfa5255d253377 /main/php/php-fix-crypt.patch
parent295eec75ce7b6de2f4ad9144ed0344d57b145288 (diff)
downloadaports-881d55a53a111ea06854f4596266c3b044f5eb53.tar.bz2
aports-881d55a53a111ea06854f4596266c3b044f5eb53.tar.xz
main/php: fix php_crypt implementation
Diffstat (limited to 'main/php/php-fix-crypt.patch')
-rw-r--r--main/php/php-fix-crypt.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/main/php/php-fix-crypt.patch b/main/php/php-fix-crypt.patch
new file mode 100644
index 000000000..5fc4d346f
--- /dev/null
+++ b/main/php/php-fix-crypt.patch
@@ -0,0 +1,38 @@
+--- php-5.5.13/ext/standard/crypt.c.orig 2014-06-25 13:10:38.930010191 -0300
++++ php-5.5.13/ext/standard/crypt.c 2014-06-25 13:45:09.762124864 -0300
+@@ -228,18 +228,20 @@
+ }
+ }
+ #else
+-
+-# if defined(HAVE_CRYPT_R) && (defined(_REENTRANT) || defined(_THREAD_SAFE))
+ {
+-# if defined(CRYPT_R_STRUCT_CRYPT_DATA)
++# if defined(HAVE_CRYPT_R)
++# if defined(CRYPT_R_STRUCT_CRYPT_DATA)
+ struct crypt_data buffer;
+ memset(&buffer, 0, sizeof(buffer));
+-# elif defined(CRYPT_R_CRYPTD)
++# elif defined(CRYPT_R_CRYPTD)
+ CRYPTD buffer;
+-# else
+-# error Data struct used by crypt_r() is unknown. Please report.
+-# endif
++# else
++# error Data struct used by crypt_r() is unknown. Please report.
++# endif
+ crypt_res = crypt_r(password, salt, &buffer);
++# else
++ crypt_res = crypt(passwrd, salt);
++#endif
+ if (!crypt_res) {
+ return FAILURE;
+ } else {
+@@ -247,7 +249,6 @@
+ return SUCCESS;
+ }
+ }
+-# endif
+ #endif
+ }
+ /* }}} */