php: fix crypt() on musl (close #4039).
This commit is contained in:
parent
953b5eb0f7
commit
c7c13adfc1
|
@ -0,0 +1,20 @@
|
|||
--- ext/standard/crypt.c.orig 2016-03-29 16:44:22.000000000 +0200
|
||||
+++ ext/standard/crypt.c 2016-04-12 18:15:09.987505656 +0200
|
||||
@@ -270,6 +270,17 @@
|
||||
return result;
|
||||
}
|
||||
}
|
||||
+# elif defined(HAVE_CRYPT)
|
||||
+ crypt_res = crypt(password, salt);
|
||||
+ if (!crypt_res || (salt[0] == '*' && salt[1] == '0')) {
|
||||
+ return NULL;
|
||||
+ } else {
|
||||
+ result = zend_string_init(crypt_res, strlen(crypt_res), 0);
|
||||
+ return result;
|
||||
+ }
|
||||
+
|
||||
+# else
|
||||
+# error No crypt() implementation
|
||||
# endif
|
||||
#endif
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
# Template build file for 'php'
|
||||
pkgname=php
|
||||
version=7.0.5
|
||||
revision=3
|
||||
revision=4
|
||||
short_desc="An HTML-embedded scripting language"
|
||||
maintainer="Steve Prybylski <sa.prybylx@gmail.com>"
|
||||
license="PHP"
|
||||
|
|
Loading…
Reference in New Issue