update sw_64 patch
(cherry picked from commit 33a7ffe6385a8bca13373b916a40a48ee215f808)
This commit is contained in:
parent
b235d695b5
commit
1c27caa1e6
42
add-sw_64-support.patch
Normal file
42
add-sw_64-support.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From 5e85390c90df59b324ed6fd56102c2c800af076a Mon Sep 17 00:00:00 2001
|
||||
From: Hailiang <mahailiang@uniontech.com>
|
||||
Date: Mon, 10 Mar 2025 14:46:57 +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.20.1
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
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)
|
||||
11
bluez.spec
11
bluez.spec
@ -1,7 +1,7 @@
|
||||
Name: bluez
|
||||
Summary: Bluetooth utilities
|
||||
Version: 5.71
|
||||
Release: 3
|
||||
Release: 4
|
||||
License: GPLv2+
|
||||
URL: http://www.bluez.org/
|
||||
Source0: http://www.kernel.org/pub/linux/bluetooth/bluez-%{version}.tar.xz
|
||||
@ -14,9 +14,7 @@ Source4: btattach-bcm-service.sh
|
||||
# workaround for broken tests (reported upstream but not yet fixed)
|
||||
# upstream:https://github.com/bluez/bluez/commit/5fc60b2ce7c4370ff8d9bc3d3c3434b212465f40
|
||||
Patch6000: backport-bluez-disable-test-mesh-crypto.patch
|
||||
%ifarch sw_64
|
||||
Patch6013: bluez-5.54-sw.patch
|
||||
%endif
|
||||
Patch6013: add-sw_64-support.patch
|
||||
Patch7000: 0001-Fix-crash-after-pair-command.patch
|
||||
Patch7001: Fix-memory-leak.patch
|
||||
|
||||
@ -169,13 +167,16 @@ make check
|
||||
%defattr(-,root,root)
|
||||
%_cups_serverbin/backend/bluetooth
|
||||
|
||||
%files help
|
||||
#%files help
|
||||
%defattr(-,root,root)
|
||||
%{_mandir}/man1/*
|
||||
%{_mandir}/man5/*
|
||||
%{_mandir}/man8/*
|
||||
|
||||
%changelog
|
||||
* Mon Mar 10 2025 mahailiang <mahailiang@uniontech.com> - 5.71-4
|
||||
- update sw_64 patch
|
||||
|
||||
* Tue Jun 4 2024 xuchenchen <xuchenchen@kylinos.cn> - 5.71-3
|
||||
- sync patches from community, shared/csip: Fix memory leak
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user