diff --git a/bluez-5.50-gcc9.patch b/bluez-5.50-gcc9.patch new file mode 100644 index 0000000..4a748fc --- /dev/null +++ b/bluez-5.50-gcc9.patch @@ -0,0 +1,49 @@ +Index: b/unit/test-sdp.c +=================================================================== +--- a/unit/test-sdp.c ++++ b/unit/test-sdp.c +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + + #include + +@@ -197,27 +198,23 @@ static gboolean send_pdu(gpointer user_d + { + struct context *context = user_data; + const struct sdp_pdu *req_pdu; +- uint16_t pdu_len; +- unsigned char *buf; ++ struct iovec iov[2]; + ssize_t len; + + req_pdu = &context->data->pdu_list[context->pdu_offset]; + +- pdu_len = req_pdu->raw_size + context->cont_size; ++ iov[0].iov_base = (void *) req_pdu->raw_data; ++ iov[0].iov_len = req_pdu->raw_size; + +- buf = g_malloc0(pdu_len); ++ iov[1].iov_base = context->cont_data; ++ iov[1].iov_len = context->cont_size; + +- memcpy(buf, req_pdu->raw_data, req_pdu->raw_size); ++ if (context->cont_size && context->cont_size != req_pdu->cont_len) ++ put_be16(req_pdu->cont_len, iov[1].iov_base + 4); + +- if (context->cont_size > 0) +- memcpy(buf + req_pdu->raw_size, context->cont_data, +- context->cont_size); ++ len = writev(context->fd, iov, 2); + +- len = write(context->fd, buf, pdu_len); +- +- g_free(buf); +- +- g_assert(len == pdu_len); ++ g_assert(len == (ssize_t) (iov[0].iov_len + iov[1].iov_len)); + + return FALSE; + } diff --git a/bluez.changes b/bluez.changes index 2ac9ca4..3dca228 100644 --- a/bluez.changes +++ b/bluez.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jan 10 18:55:13 UTC 2019 - Stefan Seyfried + +- add bluez-5.50-gcc9.patch (boo#1121404, bko#202213) + ------------------------------------------------------------------- Mon Jun 4 19:15:59 UTC 2018 - seife+obs@b1-systems.com diff --git a/bluez.spec b/bluez.spec index 0adba63..52c6028 100644 --- a/bluez.spec +++ b/bluez.spec @@ -1,7 +1,7 @@ # # spec file for package bluez # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2010-2017 B1 Systems GmbH, Vohburg, Germany # # All modifications and additions to the file contributed by third parties @@ -13,7 +13,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -38,6 +38,8 @@ Patch4: bluez-5.45-disable-broken-tests.diff Patch5: 0001-obexd-use-AM_LDFLAGS-for-linking.patch # disable tests for bypass boo#1078285 Patch6: disable_some_obex_tests.patch +# gcc9 +Patch7: bluez-5.50-gcc9.patch # Upstream suggests to use btmon instead of hcidump and does not want those patches # => PATCH-FIX-OPENSUSE for those two :-) # fix some memory leak with malformed packet (reported upstream but not yet fixed) @@ -151,6 +153,7 @@ desktop specific applets like blueman or GNOME or KDE applets). %ifarch ppc ppc64 ppc64le %patch6 -p1 %endif +%patch7 -p1 %patch101 -p1 %patch102 -p1 mkdir dbus-apis