summaryrefslogtreecommitdiffstats
path: root/12.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-09-30 15:11:56 +0200
committerRemi Collet <remi@remirepo.net>2020-09-30 15:11:56 +0200
commit15186f70b7b1870d992fcb852362806c3b7f3b93 (patch)
tree4b1f78af975034088283e64151cdec68f6dc5b67 /12.patch
parent18d5c0b99730348550c6e946bce86babbf972851 (diff)
add patches for library version 8.1.4 and for PHP 8 from
https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/12
Diffstat (limited to '12.patch')
-rw-r--r--12.patch112
1 files changed, 112 insertions, 0 deletions
diff --git a/12.patch b/12.patch
new file mode 100644
index 0000000..6fc98ec
--- /dev/null
+++ b/12.patch
@@ -0,0 +1,112 @@
+From 9d0d006505d6c8fdf4ed9d52df1be10e16fa02d3 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Wed, 30 Sep 2020 15:06:29 +0200
+Subject: [PATCH] adapt for library version 8.1.4
+
+---
+ ip2location.c | 22 +++++++++++-----------
+ 1 file changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/ip2location.c b/ip2location.c
+index 064e5a2..198410a 100644
+--- a/ip2location.c
++++ b/ip2location.c
+@@ -406,7 +406,7 @@ PHP_FUNCTION(ip2location_get_zipcode)
+ return;
+ }
+ record = IP2Location_get_zipcode(IP2LOCATION_G(ip2location_ptr), ip_address);
+-#if API_VERSION_NUMERIC >= 80100
++#if API_VERSION_NUMERIC >= 80100 && API_VERSION_NUMERIC < 80104
+ ret = record->zip_code;
+ #else
+ ret = record->zipcode;
+@@ -434,7 +434,7 @@ PHP_FUNCTION(ip2location_get_timezone)
+ return;
+ }
+ record = IP2Location_get_timezone(IP2LOCATION_G(ip2location_ptr), ip_address);
+-#if API_VERSION_NUMERIC >= 80100
++#if API_VERSION_NUMERIC >= 80100 && API_VERSION_NUMERIC < 80104
+ ret = record->time_zone;
+ #else
+ ret = record->timezone;
+@@ -469,7 +469,7 @@ PHP_FUNCTION(ip2location_get_netspeed)
+ }
+
+ record = IP2Location_get_netspeed(IP2LOCATION_G(ip2location_ptr), ip_address);
+-#if API_VERSION_NUMERIC >= 80100
++#if API_VERSION_NUMERIC >= 80100 && API_VERSION_NUMERIC < 80104
+ ret = record->net_speed;
+ #else
+ ret = record->netspeed;
+@@ -497,7 +497,7 @@ PHP_FUNCTION(ip2location_get_iddcode)
+ return;
+ }
+ record = IP2Location_get_iddcode(IP2LOCATION_G(ip2location_ptr), ip_address);
+-#if API_VERSION_NUMERIC >= 80100
++#if API_VERSION_NUMERIC >= 80100 && API_VERSION_NUMERIC < 80104
+ ret = record->idd_code;
+ #else
+ ret = record->iddcode;
+@@ -525,7 +525,7 @@ PHP_FUNCTION(ip2location_get_areacode)
+ return;
+ }
+ record = IP2Location_get_areacode(IP2LOCATION_G(ip2location_ptr), ip_address);
+-#if API_VERSION_NUMERIC >= 80100
++#if API_VERSION_NUMERIC >= 80100 && API_VERSION_NUMERIC < 80104
+ ret = record->area_code;
+ #else
+ ret = record->areacode;
+@@ -553,7 +553,7 @@ PHP_FUNCTION(ip2location_get_weatherstationcode)
+ return;
+ }
+ record = IP2Location_get_weatherstationcode(IP2LOCATION_G(ip2location_ptr), ip_address);
+-#if API_VERSION_NUMERIC >= 80100
++#if API_VERSION_NUMERIC >= 80100 && API_VERSION_NUMERIC < 80104
+ ret = record->weather_station_code;
+ #else
+ ret = record->weatherstationcode;
+@@ -581,7 +581,7 @@ PHP_FUNCTION(ip2location_get_weatherstationname)
+ return;
+ }
+ record = IP2Location_get_weatherstationname(IP2LOCATION_G(ip2location_ptr), ip_address);
+-#if API_VERSION_NUMERIC >= 80100
++#if API_VERSION_NUMERIC >= 80100 && API_VERSION_NUMERIC < 80104
+ ret = record->weather_station_name;
+ #else
+ ret = record->weatherstationname;
+@@ -655,7 +655,7 @@ PHP_FUNCTION(ip2location_get_mobilebrand)
+ return;
+ }
+ record = IP2Location_get_mobilebrand(IP2LOCATION_G(ip2location_ptr), ip_address);
+-#if API_VERSION_NUMERIC >= 80100
++#if API_VERSION_NUMERIC >= 80100 && API_VERSION_NUMERIC < 80104
+ ret = record->mobile_brand;
+ #else
+ ret = record->mobilebrand;
+@@ -702,7 +702,7 @@ PHP_FUNCTION(ip2location_get_usagetype)
+ return;
+ }
+ record = IP2Location_get_usagetype(IP2LOCATION_G(ip2location_ptr), ip_address);
+-#if API_VERSION_NUMERIC >= 80100
++#if API_VERSION_NUMERIC >= 80100 && API_VERSION_NUMERIC < 80104
+ ret = record->usage_type;
+ #else
+ ret = record->usagetype;
+@@ -738,7 +738,7 @@ PHP_FUNCTION(ip2location_get_all)
+ add_assoc_string(return_value, "city",record->city);
+ add_assoc_string(return_value, "isp",record->isp);
+ add_assoc_string(return_value, "domain",record->domain);
+-#if API_VERSION_NUMERIC >= 80100
++#if API_VERSION_NUMERIC >= 80100 && API_VERSION_NUMERIC < 80104
+ add_assoc_string(return_value, "zipcode",record->zip_code);
+ add_assoc_string(return_value, "timezone",record->time_zone);
+ add_assoc_string(return_value, "netspeed",record->net_speed);
+@@ -768,7 +768,7 @@ PHP_FUNCTION(ip2location_get_all)
+ add_assoc_string(return_value, "city",record->city, 1);
+ add_assoc_string(return_value, "isp",record->isp, 1);
+ add_assoc_string(return_value, "domain",record->domain, 1);
+-#if API_VERSION_NUMERIC >= 80100
++#if API_VERSION_NUMERIC >= 80100 && API_VERSION_NUMERIC < 80104
+ add_assoc_string(return_value, "zipcode",record->zip_code, 1);
+ add_assoc_string(return_value, "timezone",record->time_zone, 1);
+ add_assoc_string(return_value, "netspeed",record->net_speed, 1);