Fix C99 compatibility issues (#2165019)
Related to: <https://fedoraproject.org/wiki/Changes/PortingToModernC> <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
This commit is contained in:
parent
eeb2c42f8a
commit
6acf064b41
46
libzfcphbaapi-c99.patch
Normal file
46
libzfcphbaapi-c99.patch
Normal file
@ -0,0 +1,46 @@
|
||||
Declare sysfs_getAdapterAttributes in vlib_sysfs.h, to avoid an
|
||||
implicit function declaration in vlib.c.
|
||||
|
||||
Include <sys/time.h> in fc_tools/zfcp_ping.c for gettimeofday.
|
||||
|
||||
Include <scsi/sg_cmds.h> in vlib_sg.c, to avoid further
|
||||
implicit function declarations.
|
||||
|
||||
diff --git a/fc_tools/zfcp_ping.c b/fc_tools/zfcp_ping.c
|
||||
index 3cf90d8981936c20..0fa34c4702f4cfd2 100644
|
||||
--- a/fc_tools/zfcp_ping.c
|
||||
+++ b/fc_tools/zfcp_ping.c
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <signal.h>
|
||||
#include <hbaapi.h>
|
||||
#include <errno.h>
|
||||
+#include <sys/time.h>
|
||||
#include "include/zfcp_util.h"
|
||||
|
||||
#define FC_PNG_REV 0x00000001
|
||||
diff --git a/vlib_sg.c b/vlib_sg.c
|
||||
index 78f0476378e23b2d..b60ffa6de6aea6db 100644
|
||||
--- a/vlib_sg.c
|
||||
+++ b/vlib_sg.c
|
||||
@@ -21,6 +21,8 @@
|
||||
|
||||
#include "vlib.h"
|
||||
|
||||
+#include <scsi/sg_cmds.h>
|
||||
+
|
||||
#define INTERVAL 10000000
|
||||
#define RETRIES 1500
|
||||
|
||||
diff --git a/vlib_sysfs.h b/vlib_sysfs.h
|
||||
index 2da344e6d9f5f2ea..c8f9ead4f31c7c27 100644
|
||||
--- a/vlib_sysfs.h
|
||||
+++ b/vlib_sysfs.h
|
||||
@@ -35,6 +35,8 @@ HBA_STATUS sysfs_createAndReadConfigPorts(struct vlib_adapter *);
|
||||
HBA_STATUS sysfs_createAndReadConfigAdapter();
|
||||
HBA_STATUS sysfs_getDiscoveredPortAttributes(HBA_PORTATTRIBUTES **,
|
||||
struct vlib_port *);
|
||||
+HBA_STATUS sysfs_getAdapterAttributes(HBA_ADAPTERATTRIBUTES **,
|
||||
+ struct vlib_adapter *);
|
||||
HBA_STATUS sysfs_getAdapterPortAttributes(HBA_PORTATTRIBUTES **,
|
||||
struct vlib_adapter *);
|
||||
HBA_STATUS sysfs_getPortStatistics(HBA_PORTSTATISTICS **,
|
||||
@ -3,12 +3,13 @@
|
||||
Name: libzfcphbaapi
|
||||
Summary: HBA API for the zFCP device driver
|
||||
Version: 2.2.0
|
||||
Release: 17%{?dist}
|
||||
Release: 18%{?dist}
|
||||
License: CPL
|
||||
URL: http://www.ibm.com/developerworks/linux/linux390/zfcp-hbaapi.html
|
||||
# http://www.ibm.com/developerworks/linux/linux390/zfcp-hbaapi-%%{hbaapiver}.html
|
||||
Source0: http://download.boulder.ibm.com/ibmdl/pub/software/dw/linux390/ht_src/%{srcname}-%{version}.tar.gz
|
||||
Patch1: %{srcname}-2.1.1-fedora.patch
|
||||
Patch2: libzfcphbaapi-c99.patch
|
||||
|
||||
ExclusiveArch: s390 s390x
|
||||
|
||||
@ -44,6 +45,7 @@ Documentation in HTML format for the zFCP HBA API Library.
|
||||
%setup -q -n %{srcname}-%{version}
|
||||
|
||||
%patch1 -p1 -b .fedora
|
||||
%patch2 -p1
|
||||
|
||||
|
||||
%build
|
||||
@ -91,6 +93,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Jan 27 2023 Florian Weimer <fweimer@redhat.com> - 2.2.0-18
|
||||
- Fix C99 compatibility issues (#2165019)
|
||||
|
||||
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-17
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user