diff --git a/add-sw_64-support.patch b/add-sw_64-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..e413a1e4075e08beeab4314e7fa861db94073dd6 --- /dev/null +++ b/add-sw_64-support.patch @@ -0,0 +1,42 @@ +From f01b3923a57ce886fbf3095aa366b233bab72212 Mon Sep 17 00:00:00 2001 +From: xunian +Date: Mon, 31 Mar 2025 10:48:56 +0800 +Subject: [PATCH] Add sw_64 support + +--- + ell/missing.h | 2 ++ + profiles/network/bnep.c | 4 ++++ + 2 files changed, 6 insertions(+) + +diff --git a/ell/missing.h b/ell/missing.h +index b1ee0f1..32eb887 100644 +--- a/ell/missing.h ++++ b/ell/missing.h +@@ -13,6 +13,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 --git a/profiles/network/bnep.c b/profiles/network/bnep.c +index 54b9500..49bc12f 100644 +--- a/profiles/network/bnep.c ++++ b/profiles/network/bnep.c +@@ -256,7 +256,11 @@ static gboolean bnep_setup_cb(GIOChannel *chan, GIOCondition cond, + + memset(&timeo, 0, sizeof(timeo)); + timeo.tv_sec = 0; ++#if defined(__sw_64__) ++ if (setsockopt(sk, SOL_SOCKET, SO_RCVTIMEO_OLD, &timeo, ++#else + if (setsockopt(sk, SOL_SOCKET, SO_RCVTIMEO, &timeo, ++#endif + sizeof(timeo)) < 0) { + error("bnep: Set setsockopt failed: %s", strerror(errno)); + goto failed; +-- +2.41.0 + diff --git a/bluez.spec b/bluez.spec index 55c3900d42ecf7fed15f7c29221c3a9255171713..0da52f3dbf8d158a9be9cf21b0d65c8ce966db80 100644 --- a/bluez.spec +++ b/bluez.spec @@ -1,4 +1,4 @@ -%define anolis_release 1 +%define anolis_release 2 %bcond_with deprecated Name: bluez @@ -9,6 +9,7 @@ License: GPLv2+ URL: http://www.bluez.org/ Source0: http://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.xz Patch0: bluez-5.69-linkage.patch +Patch1: add-sw_64-support.patch BuildRequires: make BuildRequires: /usr/bin/rst2man @@ -319,6 +320,9 @@ install emulator/btvirt %{buildroot}/%{_libexecdir}/bluetooth/ %doc ChangeLog AUTHORS %changelog +* Mon Mar 31 2025 xunian - 5.71-2 +- Add sw_64 support + * Mon Dec 18 2023 Funda Wang - 5.71-1 - New version 5.71 - Install default input.conf/network.conf