diff --git a/container_of.patch b/container_of.patch new file mode 100644 index 0000000..145fa1e --- /dev/null +++ b/container_of.patch @@ -0,0 +1,25 @@ +Binary files libiscsi-1.18.0/.git/index and new/.git/index differ +diff -rup libiscsi-1.18.0/lib/iser.c new/lib/iser.c +--- libiscsi-1.18.0/lib/iser.c 2018-04-26 09:51:53.869133618 -0400 ++++ new/lib/iser.c 2018-04-26 10:03:45.163899456 -0400 +@@ -32,6 +32,20 @@ + #include + #include + ++ ++#ifndef container_of ++/** ++ * container_of - cast a member of a structure out to the containing structure ++ * @ptr: the pointer to the member. ++ * @type: the type of the container struct this is embedded in. ++ * @member: the name of the member within the struct. ++ * ++ */ ++#define container_of(ptr, type, member) \ ++ ((type *) ((uint8_t *)(ptr) - offsetof(type, member))) ++#endif ++ ++ + #ifdef __linux + + static int cq_handle(struct iser_conn *iser_conn); diff --git a/libiscsi.spec b/libiscsi.spec index f8a104c..2141b14 100644 --- a/libiscsi.spec +++ b/libiscsi.spec @@ -1,7 +1,7 @@ Name: libiscsi Summary: iSCSI client library Version: 1.18.0 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPLv2+ URL: https://github.com/sahlberg/%{name} @@ -9,6 +9,7 @@ Source: https://github.com/sahlberg/%{name}/archive/%{version}.tar.gz Patch1: disable-ld_iscsi.patch Patch2: fix-gcc7-warnings.patch Patch3: fix-32bit-build.patch +Patch4: container_of.patch BuildRequires: autoconf BuildRequires: automake @@ -97,7 +98,10 @@ The libiscsi-devel package includes the header files for libiscsi. %{_libdir}/pkgconfig/libiscsi.pc %changelog -* Fri Mar 23 2018 Cole Robinson - 1.18.0-2 +* Mon Apr 30 2018 Cole Robinson - 1.18.0-4 +- Fix build with newer rdma-core + +* Fri Mar 23 2018 Cole Robinson - 1.18.0-3 - Fix rdma deps and don't restrict archs - Add --disable-werror to fix gcc8 build (bz #1556044) - Spec file cleanups (bz #1483290)