From 4b0a3deddaafea59d43d2f1eb1b62229aa48e530 Mon Sep 17 00:00:00 2001 From: "zhixin.zhang" Date: Thu, 8 Dec 2022 16:40:22 +0800 Subject: [PATCH] Add Sw64 architecture (cherry picked from commit 9afdc0f30d6300e2ded19d95cda69bf5784509f8) --- bluez-5.54-sw.patch | 25 +++++++++++++++++++++++++ bluez.spec | 8 +++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 bluez-5.54-sw.patch diff --git a/bluez-5.54-sw.patch b/bluez-5.54-sw.patch new file mode 100644 index 0000000..8d4bdb9 --- /dev/null +++ b/bluez-5.54-sw.patch @@ -0,0 +1,25 @@ +diff -Nuar bluez-5.54/ell/missing.h bluez-5.54-sw/ell/missing.h +--- bluez-5.54/ell/missing.h 2019-04-03 17:49:21.000000000 +0000 ++++ bluez-5.54-sw/ell/missing.h 2022-07-20 13:43:50.420000000 +0000 +@@ -27,6 +27,8 @@ + # define __NR_getrandom 318 + # elif defined(__i386__) + # define __NR_getrandom 355 ++# elif defined(__sw_64__) ++# define __NR_getrandom 511 + # elif defined(__arm__) + # define __NR_getrandom 384 + # elif defined(__aarch64__) +diff -Nuar bluez-5.54/profiles/network/bnep.c bluez-5.54-sw/profiles/network/bnep.c +--- bluez-5.54/profiles/network/bnep.c 2019-09-19 18:51:03.000000000 +0000 ++++ bluez-5.54-sw/profiles/network/bnep.c 2022-07-20 13:58:58.390000000 +0000 +@@ -268,7 +268,8 @@ + + memset(&timeo, 0, sizeof(timeo)); + timeo.tv_sec = 0; +- setsockopt(sk, SOL_SOCKET, SO_RCVTIMEO, &timeo, sizeof(timeo)); ++/* setsockopt(sk, SOL_SOCKET, SO_RCVTIMEO, &timeo, sizeof(timeo)); */ ++ setsockopt(sk, SOL_SOCKET, SO_RCVTIMEO_OLD, &timeo, sizeof(timeo)); + + sk = g_io_channel_unix_get_fd(session->io); + if (bnep_connadd(sk, session->src, session->iface) < 0) diff --git a/bluez.spec b/bluez.spec index 0e929a2..88a74eb 100644 --- a/bluez.spec +++ b/bluez.spec @@ -1,7 +1,7 @@ Name: bluez Summary: Bluetooth utilities Version: 5.54 -Release: 15 +Release: 16 License: GPLv2+ URL: http://www.bluez.org/ Source0: http://www.kernel.org/pub/linux/bluetooth/bluez-%{version}.tar.xz @@ -34,6 +34,9 @@ Patch6009: backport-CVE-2021-41229.patch Patch6010: backport-CVE-2022-39176.patch Patch6011: backport-0001-CVE-2022-39177.patch Patch6012: backport-0002-CVE-2022-39177.patch +%ifarch sw_64 +Patch6013: bluez-5.54-sw.patch +%endif BuildRequires: dbus-devel >= 1.6 libell-devel >= 0.28 autoconf BuildRequires: glib2-devel libical-devel readline-devel @@ -190,6 +193,9 @@ make check %{_mandir}/man8/* %changelog +* Thu Dec 08 2022 zhangzhixin - 5.54-16 +- add sw64 patch + * Wed Sep 07 2022 wangkerong - 5.54-15 - DESC:fix CVE-2022-39176,CVE-2022-39177 -- Gitee