diff --git a/libqb-fix-list-handling-gcc10-2.patch b/libqb-fix-list-handling-gcc10-2.patch new file mode 100644 index 0000000..2a7da48 --- /dev/null +++ b/libqb-fix-list-handling-gcc10-2.patch @@ -0,0 +1,49 @@ +From 9249caf51698a3c867cffd25833b8d700eb939e0 +From: Christine Caulfield +Date: Mon, 23 Apr 2020 16:28:57 +0000 +Subject: [PATCH] list: additional fix list handling for gcc10 + +--- libqb-1.0.5.orig/include/qb/qblist.h 2020-04-23 10:18:19.992706670 +0100 ++++ libqb-1.0.5/include/qb/qblist.h 2020-04-23 10:19:55.704980389 +0100 +@@ -28,6 +28,7 @@ + /* *INDENT-ON* */ + + #include ++#include + #include + + /** +@@ -109,16 +110,16 @@ + + /** + * Replace old entry by new one +- * @param old: the element to be replaced +- * @param new: the new element to insert ++ * @param old_one: the element to be replaced ++ * @param new_one: the new element to insert + */ +-static inline void qb_list_replace(struct qb_list_head *old, +- struct qb_list_head *new) ++static inline void qb_list_replace(struct qb_list_head *old_one, ++ struct qb_list_head *new_one) + { +- new->next = old->next; +- new->next->prev = new; +- new->prev = old->prev; +- new->prev->next = new; ++ new_one->next = old_one->next; ++ new_one->next->prev = new_one; ++ new_one->prev = old_one->prev; ++ new_one->prev->next = new_one; + } + + /** +@@ -194,7 +195,7 @@ + * @param member: the name of the list_struct within the struct. + */ + #define qb_list_entry(ptr,type,member) ({ \ +- ((type *)((void*)ptr - offsetof(type, member))); }) ++ ((type *)((char*)ptr - offsetof(type, member))); }) + + /** + * Get the first element from a list diff --git a/libqb.spec b/libqb.spec index 0341066..b42d755 100644 --- a/libqb.spec +++ b/libqb.spec @@ -2,7 +2,7 @@ Name: libqb Version: 1.0.5 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Library providing high performance logging, tracing, ipc, and poll License: LGPLv2+ @@ -11,6 +11,7 @@ Source0: https://github.com/ClusterLabs/libqb/releases/download/v%{versio Patch0: IPC-avoid-temporary-channel-priority-loss.patch # https://github.com/ClusterLabs/libqb/pull/383 Patch1: libqb-fix-list-handling-gcc10.patch +Patch2: libqb-fix-list-handling-gcc10-2.patch BuildRequires: autoconf automake libtool BuildRequires: check-devel @@ -71,6 +72,10 @@ developing applications that use %{name}. %{_mandir}/man3/qb*3* %changelog +* Thu Apr 23 2020 Christine Caulfield 1.0.5-6 +- Further fix for qblist when compiling on gcc10 + Affects users of the package rather than libqb itself + * Mon Apr 6 2020 Peter Robinson 1.0.5-5 - Upstream fix for test failures (fix FTBFS) - spec cleanups