diff options
author | Petr Vaněk <arkamar@atlas.cz> | 2022-07-29 14:42:10 +0200 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2022-08-18 10:06:18 +0300 |
commit | ad699292711447f8983a44382c61c0dd00967145 (patch) | |
tree | a3625443fbdc445cd87cedfb9d12886af1cc83f0 /net-im/bitlbee | |
parent | media-sound/qtractor: update dependencies for 0.9.27-r1 (diff) | |
download | gentoo-ad699292711447f8983a44382c61c0dd00967145.tar.gz gentoo-ad699292711447f8983a44382c61c0dd00967145.tar.bz2 gentoo-ad699292711447f8983a44382c61c0dd00967145.zip |
net-im/bitlbee: fix strict-aliasing issue in bundled library
The patch is based on fixes from upstream. LICENSE is extended with
BSD-2, the license of bundled library.
Upstream-PR: https://github.com/bitlbee/bitlbee/pull/162
Closes: https://bugs.gentoo.org/861371
Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'net-im/bitlbee')
-rw-r--r-- | net-im/bitlbee/bitlbee-3.6-r1.ebuild | 3 | ||||
-rw-r--r-- | net-im/bitlbee/files/bitlbee-3.6-strict-aliasing.patch | 31 |
2 files changed, 33 insertions, 1 deletions
diff --git a/net-im/bitlbee/bitlbee-3.6-r1.ebuild b/net-im/bitlbee/bitlbee-3.6-r1.ebuild index c54da3fb2392..73fbb3f13b6c 100644 --- a/net-im/bitlbee/bitlbee-3.6-r1.ebuild +++ b/net-im/bitlbee/bitlbee-3.6-r1.ebuild @@ -18,7 +18,7 @@ fi DESCRIPTION="irc to IM gateway that support multiple IM protocols" HOMEPAGE="https://www.bitlbee.org/" -LICENSE="GPL-2" +LICENSE="GPL-2 BSD-2" SLOT="0" IUSE_PROTOCOLS="msn oscar purple twitter +xmpp" IUSE="debug +gnutls ipv6 libevent nss otr +plugins selinux test xinetd @@ -65,6 +65,7 @@ PATCHES=( "${FILESDIR}"/${PN}-3.5-libcheck.patch "${FILESDIR}"/${PN}-3.5-libevent.patch "${FILESDIR}"/${P}-disabled-plugins-use.patch + "${FILESDIR}"/${P}-strict-aliasing.patch ) src_configure() { diff --git a/net-im/bitlbee/files/bitlbee-3.6-strict-aliasing.patch b/net-im/bitlbee/files/bitlbee-3.6-strict-aliasing.patch new file mode 100644 index 000000000000..30ecff9747ee --- /dev/null +++ b/net-im/bitlbee/files/bitlbee-3.6-strict-aliasing.patch @@ -0,0 +1,31 @@ +Based on upstream [1] commits: +- 161dff8321df ("Fix error type-punned pointer warning") +- d7b67db02aaa ("Fix error type-punned pointer warning") + +[1] https://github.com/json-parser/json-parser + +Upstream-PR: https://github.com/bitlbee/bitlbee/pull/162 + +diff --git a/lib/json.c b/lib/json.c +index 24288f94..2150cbaf 100644 +--- a/lib/json.c ++++ b/lib/json.c +@@ -139,7 +139,7 @@ static int new_value + return 0; + } + +- value->_reserved.object_mem = (*(char **) &value->u.object.values) + values_size; ++ value->_reserved.object_mem = (void *) (((char *) value->u.object.values) + values_size); + + value->u.object.length = 0; + break; +@@ -406,7 +406,8 @@ json_value * json_parse_ex(json_settings * settings, + case json_object: + + if (state.first_pass) { +- (*(json_char **) &top->u.object.values) += string_length + 1; ++ json_char **chars = (json_char **) &top->u.object.values; ++ chars[0] += string_length + 1; + } else { + top->u.object.values [top->u.object.length].name + = (json_char *) top->_reserved.object_mem; |