Port to C99
Related to: <https://fedoraproject.org/wiki/Changes/PortingToModernC> <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
This commit is contained in:
parent
e1bebae524
commit
f0ce58d61d
47
mstflint-c99.patch
Normal file
47
mstflint-c99.patch
Normal file
@ -0,0 +1,47 @@
|
||||
Add additional #include directives for C99 compatibility. Avoid
|
||||
implicit declarations of cibfw_register_mfai_pack,
|
||||
cibfw_register_mfai_unpack, cibfw_register_mfai_size by including
|
||||
<tools_layouts/cibfw_layouts.h>, and of getenv by including
|
||||
<stdlib.h>.
|
||||
|
||||
Submitted upstream: <https://github.com/Mellanox/mstflint/pull/774>
|
||||
|
||||
diff --git a/mflash/mflash_gw.c b/mflash/mflash_gw.c
|
||||
index f296700ddaaf022a..55e5cb9d356c09f4 100644
|
||||
--- a/mflash/mflash_gw.c
|
||||
+++ b/mflash/mflash_gw.c
|
||||
@@ -43,6 +43,8 @@
|
||||
#include "mflash_access_layer.h"
|
||||
#include "flash_int_defs.h"
|
||||
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
#ifdef __WIN__
|
||||
//
|
||||
// Windows (Under DDK)
|
||||
diff --git a/mflash/mflash_new_gw.c b/mflash/mflash_new_gw.c
|
||||
index 3bd044ea327f7b9b..4d0bb21ddf1d47b4 100644
|
||||
--- a/mflash/mflash_new_gw.c
|
||||
+++ b/mflash/mflash_new_gw.c
|
||||
@@ -42,6 +42,9 @@
|
||||
#include "mflash_dev_capability.h"
|
||||
#include "mflash_access_layer.h"
|
||||
#include "flash_int_defs.h"
|
||||
+
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
#define DPRINTF(args) \
|
||||
do \
|
||||
{ \
|
||||
diff --git a/reg_access/reg_access.c b/reg_access/reg_access.c
|
||||
index 622b1a151ec8dcc3..736e67b30aa7f7af 100644
|
||||
--- a/reg_access/reg_access.c
|
||||
+++ b/reg_access/reg_access.c
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <tools_layouts/reg_access_hca_layouts.h>
|
||||
#include <tools_layouts/reg_access_switch_layouts.h>
|
||||
#include <tools_layouts/tools_open_layouts.h>
|
||||
+#include <tools_layouts/cibfw_layouts.h>
|
||||
|
||||
#define REG_ID_PCNR 0x5050
|
||||
#define REG_ID_PAOS 0x5006
|
@ -11,6 +11,7 @@ Group: Applications/System
|
||||
|
||||
Patch4: add-default-link-flags-for-shared-libraries.patch
|
||||
Patch6: replace-mlxfwreset-with-mstfwreset-in-mstflint-message.patch
|
||||
Patch7: mstflint-c99.patch
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: libstdc++-devel, zlib-devel, libibmad-devel, gcc-c++, gcc
|
||||
@ -31,6 +32,7 @@ for network adapters based on Mellanox Technologies chips.
|
||||
|
||||
%patch4 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
|
||||
find . -type f -iname '*.[ch]' -exec chmod a-x '{}' ';'
|
||||
find . -type f -iname '*.cpp' -exec chmod a-x '{}' ';'
|
||||
|
Loading…
Reference in New Issue
Block a user