git: e23cb62f1f67 - 2025Q4 - databases/proxysql: fix build on armv7 for real

From: Robert Clausecker <fuz_at_FreeBSD.org>
Date: Wed, 12 Nov 2025 13:55:54 UTC
The branch 2025Q4 has been updated by fuz:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e23cb62f1f6700cabb5ab5342e779a2bfa1cc660

commit e23cb62f1f6700cabb5ab5342e779a2bfa1cc660
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2025-11-05 18:57:43 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2025-11-12 13:55:27 +0000

    databases/proxysql: fix build on armv7 for real
    
    Seems like I forgot to check in the patch files last time.
    Write the patch files anew and add them to the tree.
    
    Fixes:          0586757c29f879c3375f7a782d1d4824851d360a
    Approved by:    portmgr (build fix blanket)
    MFH:            2025Q4
    
    (cherry picked from commit da9ea89b034e040b12ce35e4b6e96500ae617793)
---
 .../files/patch-include_MySQL__HostGroups__Manager.h       | 14 ++++++++++++++
 databases/proxysql/files/patch-lib_ProxySQL__Admin.cpp     | 11 +++++++++++
 databases/proxysql/files/patch-lib_ProxySQL__GloVars.cpp   | 14 ++++++++++++++
 3 files changed, 39 insertions(+)

diff --git a/databases/proxysql/files/patch-include_MySQL__HostGroups__Manager.h b/databases/proxysql/files/patch-include_MySQL__HostGroups__Manager.h
new file mode 100644
index 000000000000..0829899a6aaa
--- /dev/null
+++ b/databases/proxysql/files/patch-include_MySQL__HostGroups__Manager.h
@@ -0,0 +1,14 @@
+--- include/MySQL_HostGroups_Manager.h.orig	2025-11-05 18:26:00 UTC
++++ include/MySQL_HostGroups_Manager.h
+@@ -1250,9 +1250,9 @@ T j_get_srv_default_int_val(
+ 				return val;
+ 			} else {
+ 				proxy_error(
+-					"Invalid value %ld supplied for 'mysql_hostgroup_attributes.servers_defaults.%s' for hostgroup %d."
++					"Invalid value %lld supplied for 'mysql_hostgroup_attributes.servers_defaults.%s' for hostgroup %d."
+ 						" Value NOT UPDATED.\n",
+-					static_cast<int64_t>(val), key.c_str(), hid
++					static_cast<long long int>(val), key.c_str(), hid
+ 				);
+ 			}
+ 		} else {
diff --git a/databases/proxysql/files/patch-lib_ProxySQL__Admin.cpp b/databases/proxysql/files/patch-lib_ProxySQL__Admin.cpp
new file mode 100644
index 000000000000..3d4ca9be6b03
--- /dev/null
+++ b/databases/proxysql/files/patch-lib_ProxySQL__Admin.cpp
@@ -0,0 +1,11 @@
+--- lib/ProxySQL_Admin.cpp.orig	2025-11-05 18:44:48 UTC
++++ lib/ProxySQL_Admin.cpp
+@@ -332,7 +332,7 @@ char rand_del[6];
+ char rand_del[6];
+ 
+ //static int http_handler(void *cls, struct MHD_Connection *connection, const char *url, const char *method, const char *version, const char *upload_data, size_t *upload_data_size, void **ptr) {
+-MHD_Result http_handler(void *cls, struct MHD_Connection *connection, const char *url, const char *method, const char *version, const char *upload_data, long unsigned int *upload_data_size, void **ptr) {
++MHD_Result http_handler(void *cls, struct MHD_Connection *connection, const char *url, const char *method, const char *version, const char *upload_data, size_t *upload_data_size, void **ptr) {
+ 	return (MHD_Result) GloAdmin->AdminHTTPServer->handler(cls, connection, url, method, version, upload_data, upload_data_size, ptr);
+ }
+ 
diff --git a/databases/proxysql/files/patch-lib_ProxySQL__GloVars.cpp b/databases/proxysql/files/patch-lib_ProxySQL__GloVars.cpp
new file mode 100644
index 000000000000..d806d2c9ed55
--- /dev/null
+++ b/databases/proxysql/files/patch-lib_ProxySQL__GloVars.cpp
@@ -0,0 +1,14 @@
+--- lib/ProxySQL_GloVars.cpp.orig	2025-11-05 18:21:29 UTC
++++ lib/ProxySQL_GloVars.cpp
+@@ -334,7 +334,10 @@ void update_ulong_var_if_set(uint64_t& cur_val, ez::ez
+ 
+ void update_ulong_var_if_set(uint64_t& cur_val, ez::ezOptionParser* opt, const char* cmd_opt) {
+ 	if (opt->isSet(cmd_opt)) {
+-		opt->get(cmd_opt)->getULong(cur_val);
++		unsigned long new_val = cur_val;
++
++		opt->get(cmd_opt)->getULong(new_val);
++		cur_val = new_val;
+ 	}
+ }
+