Notification time stamped 2018-04-30 21:59:49 UTC
From 73b83d86075c3856eaa6a9831b859ffb82b025a2 Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso(a)redhat.com>
Date: Apr 30 2018 21:57:49 +0000
Subject: Handle missing container_of
libiscsi was implicitly depending on this definition from rdma headers.
Latest rdma headers dropped this though, so we need to define it
locally
---
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 <semaphore.h>
+ #include <poll.h>
+
++
++#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 <crobinso(a)redhat.com> - 1.18.0-2
+* Mon Apr 30 2018 Cole Robinson <crobinso(a)redhat.com> - 1.18.0-4
+- Fix build with newer rdma-core
+
+* Fri Mar 23 2018 Cole Robinson <crobinso(a)redhat.com> - 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)
https://src.fedoraproject.org/rpms/libiscsi/c/73b83d86075c3856eaa6a9831b8...