Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev-libs/ucommon: Fix building with GCC-7 and GCC8 #9994

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
53 changes: 53 additions & 0 deletions dev-libs/ucommon/files/ucommon-6.5.7-gcc7.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
Bug: https://bugs.gentoo.org/638252

--- a/inc/ucommon/linked.h
+++ b/inc/ucommon/linked.h
@@ -1992,7 +1992,7 @@
* @return pointer to index root.
*/
inline NamedObject **root(void) {
- return static_cast<NamedObject**>(&head);
+ return reinterpret_cast<NamedObject**>(&head);
}

/**
--- a/inc/ucommon/memory.h
+++ b/inc/ucommon/memory.h
@@ -1228,7 +1228,7 @@
* inherit keyassoc privately.
* @return pager utilization, 0-100.
*/
- inline unsigned utilization(void) const
+ inline unsigned utilization(void)
{return mempager::utilization();}

/**
@@ -1322,7 +1322,7 @@
* inherit keyassoc privately.
* @return pager utilization, 0-100.
*/
- inline unsigned utilization(void) const
+ inline unsigned utilization(void)
{return mempager::utilization();}

/**
@@ -1396,7 +1396,7 @@
* @param name to search for.
* @return typed object if found through map or NULL.
*/
- inline T *get(const char *name) const {
+ inline T *get(const char *name) {
T *node = (static_cast<T*>(NamedObject::map(idx, name, M)));
if(!node) {
node = init<T>(static_cast<T*>(mempager::_alloc(sizeof(T))));
--- a/inc/ucommon/object.h
+++ b/inc/ucommon/object.h
@@ -301,7 +301,7 @@
return reference_cast<T>(get(offset));
}

- inline const T* at(unsigned offset) const {
+ inline const T* at(unsigned offset) {
return immutable_cast<T*>(SparseObjects::get(offset));
}

1 change: 1 addition & 0 deletions dev-libs/ucommon/ucommon-6.5.7.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ DOCS=(README NEWS SUPPORT ChangeLog AUTHORS)
PATCHES=(
"${FILESDIR}/${PN}-6.0.3-install_gcrypt.m4_file.patch"
"${FILESDIR}/${PN}-6.3.1-gcrypt_autotools.patch"
"${FILESDIR}/${PN}-6.5.7-gcc7.patch"
)

# Needed for doxygen, bug #526726
Expand Down