fix build failure due to gcc updated

This commit is contained in:
wang--ge 2023-07-04 15:18:50 +08:00
parent c320457e29
commit d5dfaa1ced
2 changed files with 48 additions and 1 deletions

View File

@ -0,0 +1,43 @@
From a0776ec857a40991f8ff82e49d9e9a0302848038 Mon Sep 17 00:00:00 2001
From: wang--ge <wang__ge@126.com>
Date: Tue, 4 Jul 2023 15:02:53 +0800
Subject: [PATCH] fix build failure due to gcc updated
---
ext_libs/sqlite/sqlite3.c | 6 +++++-
mlxfwupdate/server_request.cpp | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/ext_libs/sqlite/sqlite3.c b/ext_libs/sqlite/sqlite3.c
index e198678..e244656 100755
--- a/ext_libs/sqlite/sqlite3.c
+++ b/ext_libs/sqlite/sqlite3.c
@@ -100249,7 +100249,11 @@ SQLITE_PRIVATE void sqlite3DefaultRowEst(Index *pIdx){
** number of rows in the table. Or 10, if the estimated number of rows
** in the table is less than that. */
a[0] = pIdx->pTable->nRowLogEst;
- if( a[0]<33 ) a[0] = 33; assert( 33==sqlite3LogEst(10) );
+ if( a[0]<33 ) {
+ a[0] = 33;
+ }
+
+ assert( 33==sqlite3LogEst(10) );
/* Estimate that a[1] is 10, a[2] is 9, a[3] is 8, a[4] is 7, a[5] is
** 6 and each subsequent value (if any) is 5. */
diff --git a/mlxfwupdate/server_request.cpp b/mlxfwupdate/server_request.cpp
index a33559a..46a19fa 100644
--- a/mlxfwupdate/server_request.cpp
+++ b/mlxfwupdate/server_request.cpp
@@ -482,7 +482,7 @@ int ServerRequest::curl_request(const char *url,
// Internal CURL progressmeter must be disabled if we provide our own callback
curl_easy_setopt(_curl, CURLOPT_NOPROGRESS, false);
// Install the callback function
- curl_easy_setopt(_curl, CURLOPT_PROGRESSFUNCTION, progress_func);
+ curl_easy_setopt(_curl, CURLOPT_XFERINFOFUNCTION, progress_func);
}
if (_Proxy.size() > 0) {
curl_easy_setopt(_curl, CURLOPT_PROXY, _Proxy.c_str());
--
2.33.0

View File

@ -1,7 +1,7 @@
Name: mstflint
Summary: Firmware Burning and Diagnostics Tools
Version: 4.10.0
Release: 10
Release: 11
License: GPLv2+ or BSD
Url: https://github.com/Mellanox/mstflint
Source: https://github.com/Mellanox/%{name}/releases/download/v4.10.0-2/%{name}-%{version}.tar.gz
@ -9,6 +9,7 @@ Patch0000: 0001-Fix-compile-errors.patch
Patch0001: fix-return-local-addr.patch
Patch0002: backport-0001-Title-Fix-error-while-burning-mcc-enabled.patch
Patch0003: backport-0001-Title-Fix-errors-found-with-checkpatch-script.patch
Patch0004: 0002-fix-build-failure-due-to-gcc-updated.patch
BuildRequires: libstdc++-devel zlib-devel rdma-core-devel gcc-c++ gcc
BuildRequires: libcurl-devel boost-devel libxml2-devel openssl-devel
Obsoletes: openib-mstflint <= 1.4 openib-tvflash <= 0.9.2 tvflash <= 0.9.0
@ -45,6 +46,9 @@ strip %{buildroot}/%{_libdir}/mstflint/python_tools/*.so
%{_mandir}/man1/*
%changelog
* Tue Jul 04 2023 Ge Wang <wang__ge@126.com> - 4.10.0-11
- Fix build failure due to gcc updated
* Thu Jan 05 2023 chenmaodong <chenmaodong@xfusion.com> - 4.10.0-10
- Fix errors found with checkpatch script