Further fixes for building with gcc10
This commit is contained in:
parent
18ca1fdc7e
commit
044dcc3f4a
49
libqb-fix-list-handling-gcc10-2.patch
Normal file
49
libqb-fix-list-handling-gcc10-2.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
From 9249caf51698a3c867cffd25833b8d700eb939e0
|
||||||
|
From: Christine Caulfield <ccaulfie@redhat.com>
|
||||||
|
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 <stdint.h>
|
||||||
|
+#include <stddef.h>
|
||||||
|
#include <qb/qbdefs.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
@@ -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
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: libqb
|
Name: libqb
|
||||||
Version: 1.0.5
|
Version: 1.0.5
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
Summary: Library providing high performance logging, tracing, ipc, and poll
|
Summary: Library providing high performance logging, tracing, ipc, and poll
|
||||||
|
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
@ -11,6 +11,7 @@ Source0: https://github.com/ClusterLabs/libqb/releases/download/v%{versio
|
|||||||
Patch0: IPC-avoid-temporary-channel-priority-loss.patch
|
Patch0: IPC-avoid-temporary-channel-priority-loss.patch
|
||||||
# https://github.com/ClusterLabs/libqb/pull/383
|
# https://github.com/ClusterLabs/libqb/pull/383
|
||||||
Patch1: libqb-fix-list-handling-gcc10.patch
|
Patch1: libqb-fix-list-handling-gcc10.patch
|
||||||
|
Patch2: libqb-fix-list-handling-gcc10-2.patch
|
||||||
|
|
||||||
BuildRequires: autoconf automake libtool
|
BuildRequires: autoconf automake libtool
|
||||||
BuildRequires: check-devel
|
BuildRequires: check-devel
|
||||||
@ -71,6 +72,10 @@ developing applications that use %{name}.
|
|||||||
%{_mandir}/man3/qb*3*
|
%{_mandir}/man3/qb*3*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Apr 23 2020 Christine Caulfield <ccaulfie@redhat.com> 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 <pbrobinson@fedoraproject.org> 1.0.5-5
|
* Mon Apr 6 2020 Peter Robinson <pbrobinson@fedoraproject.org> 1.0.5-5
|
||||||
- Upstream fix for test failures (fix FTBFS)
|
- Upstream fix for test failures (fix FTBFS)
|
||||||
- spec cleanups
|
- spec cleanups
|
||||||
|
Loading…
Reference in New Issue
Block a user