aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2020-07-28 14:30:01 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2020-07-28 16:29:02 +0000
commitc48d79a3d0aadea305f95af8280a140652fc705f (patch)
treefb8493f97eafe5a369a694c873152e6d52062454
parent5c0fee19a6ea76f5b2b6e1ccaa3a21340271453e (diff)
downloadaports-c48d79a3d0aadea305f95af8280a140652fc705f.tar.gz
aports-c48d79a3d0aadea305f95af8280a140652fc705f.tar.bz2
aports-c48d79a3d0aadea305f95af8280a140652fc705f.tar.xz
community/php7: fix unixtojd on 32 bit arches
fixes #11782
-rw-r--r--community/php7/APKBUILD6
-rw-r--r--community/php7/musl-time64.patch27
2 files changed, 31 insertions, 2 deletions
diff --git a/community/php7/APKBUILD b/community/php7/APKBUILD
index 805b289949..2985d34535 100644
--- a/community/php7/APKBUILD
+++ b/community/php7/APKBUILD
@@ -26,7 +26,7 @@
pkgname=php7
_pkgreal=php
pkgver=7.4.8
-pkgrel=1
+pkgrel=2
_apiver=20190902
_suffix=${pkgname#php}
# Is this package the default (latest) PHP version?
@@ -102,6 +102,7 @@ source="https://php.net/distributions/$_pkgreal-$pkgver.tar.xz
fix-tests-devserver.patch
enchant-2.patch
78008-dns_check_record-74.patch
+ musl-time64.patch
"
builddir="$srcdir/$_pkgreal-$pkgver"
@@ -684,4 +685,5 @@ ebf571c5e595221b9944d7e840807ebb68c1be38bf117186e19a3bd1070310ece5918bcaa5f94167
16399fbf6a966f9beffe00f659f9551ef8e52285bca116da5bd5b15ec99a2b0bd5fa03be0faa6c893802aa44c100d634083343a9ac0cd2467812865df66dd572 php7-fpm-version-suffix.patch
3bfeea79f9acfaa7be5bab85cd3d02713abb569e54024a22bb2c747c06d97f83ac2c63dcd75c7c409426ac03f8bc2ccc01bcd66bc39a767930d32542349123f9 fix-tests-devserver.patch
7c8c3cac9efce81d525cb5a70e1402e393881b83ef4c7b5d39d3565803d21cd283daf3d74e9a8b059ecac66cf339756acc63608ffcb83d960dba86583bd45108 enchant-2.patch
-4cc2e56c00377917fa756b73e5587341230358c3a353dd880909c7d4119c29758f7ce7dea290575fbe9e109ee1b2236cb71be7c1b1a9a971389f7e58802a3456 78008-dns_check_record-74.patch"
+4cc2e56c00377917fa756b73e5587341230358c3a353dd880909c7d4119c29758f7ce7dea290575fbe9e109ee1b2236cb71be7c1b1a9a971389f7e58802a3456 78008-dns_check_record-74.patch
+1bdb4e692bd554dc3afd89ad8fd2532787a0ab099796fb938a5307bf9a12193f7758e574ccf585709c37c7d34f7b21137d794a32f843fbd94ace36437a83c77e musl-time64.patch"
diff --git a/community/php7/musl-time64.patch b/community/php7/musl-time64.patch
new file mode 100644
index 0000000000..bba7323bbe
--- /dev/null
+++ b/community/php7/musl-time64.patch
@@ -0,0 +1,27 @@
+diff --git a/ext/calendar/cal_unix.c b/ext/calendar/cal_unix.c
+index e24ac56..e1b203a 100644
+--- a/ext/calendar/cal_unix.c
++++ b/ext/calendar/cal_unix.c
+@@ -28,16 +28,19 @@
+ PHP_FUNCTION(unixtojd)
+ {
+ time_t ts = 0;
++ zend_long tl = 0;
+ struct tm *ta, tmbuf;
+
+- if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &ts) == FAILURE) {
++ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &tl) == FAILURE) {
+ return;
+ }
+
+- if (!ts) {
++ if (!tl) {
+ ts = time(NULL);
+- } else if (ts < 0) {
++ } else if (tl < 0) {
+ RETURN_FALSE;
++ } else {
++ ts = (time_t)tl;
+ }
+
+ if (!(ta = php_localtime_r(&ts, &tmbuf))) {