Accepting request 714364 from home:jirislaby:branches:Base:System

- Add 0001-tools-Fix-build-after-y2038-changes-in-glibc.patch: Fix
  build after y2038 changes in glibc

OBS-URL: https://build.opensuse.org/request/show/714364
OBS-URL: https://build.opensuse.org/package/show/Base:System/bluez?expand=0&rev=266
This commit is contained in:
Stefan Seyfried 2019-07-10 19:02:27 +00:00 committed by Git OBS Bridge
parent d12a36af48
commit 700d7a7e3e
3 changed files with 77 additions and 1 deletions

View File

@ -0,0 +1,67 @@
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 7 Jun 2019 09:51:33 +0200
Subject: tools: Fix build after y2038 changes in glibc
Git-repo: git://git.kernel.org/pub/scm/bluetooth/bluez.git
Git-commit: f36f71f60b1e68c0f12e615b9b128d089ec3dd19
Patch-mainline: yes
The 32-bit SIOCGSTAMP has been deprecated. Use the deprecated name
to fix the build.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
tools/l2test.c | 6 +++++-
tools/rctest.c | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/tools/l2test.c b/tools/l2test.c
index e755ac881..e787c2ce2 100644
--- a/tools/l2test.c
+++ b/tools/l2test.c
@@ -55,6 +55,10 @@
#define BREDR_DEFAULT_PSM 0x1011
#define LE_DEFAULT_PSM 0x0080
+#ifndef SIOCGSTAMP_OLD
+#define SIOCGSTAMP_OLD SIOCGSTAMP
+#endif
+
/* Test modes */
enum {
SEND,
@@ -907,7 +911,7 @@ static void recv_mode(int sk)
if (timestamp) {
struct timeval tv;
- if (ioctl(sk, SIOCGSTAMP, &tv) < 0) {
+ if (ioctl(sk, SIOCGSTAMP_OLD, &tv) < 0) {
timestamp = 0;
memset(ts, 0, sizeof(ts));
} else {
diff --git a/tools/rctest.c b/tools/rctest.c
index 94490f462..bc8ed875d 100644
--- a/tools/rctest.c
+++ b/tools/rctest.c
@@ -50,6 +50,10 @@
#include "src/shared/util.h"
+#ifndef SIOCGSTAMP_OLD
+#define SIOCGSTAMP_OLD SIOCGSTAMP
+#endif
+
/* Test modes */
enum {
SEND,
@@ -505,7 +509,7 @@ static void recv_mode(int sk)
if (timestamp) {
struct timeval tv;
- if (ioctl(sk, SIOCGSTAMP, &tv) < 0) {
+ if (ioctl(sk, SIOCGSTAMP_OLD, &tv) < 0) {
timestamp = 0;
memset(ts, 0, sizeof(ts));
} else {
--
2.21.0

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Jul 10 06:02:54 UTC 2019 - Jiri Slaby <jslaby@suse.com>
- Add 0001-tools-Fix-build-after-y2038-changes-in-glibc.patch: Fix
build after y2038 changes in glibc
-------------------------------------------------------------------
Tue Jun 25 13:19:30 UTC 2019 - Frederic Crozat <fcrozat@suse.com>

View File

@ -41,7 +41,9 @@ Patch6: disable_some_obex_tests.patch
# PATCH-FIX-UPSTREAM: improve profile availability on some audio devices
Patch7: 0001-policy-Add-logic-to-connect-a-Sink.patch
# PATCH-FIX-UPSTREAM a2dp fixes for newer codecs
Patch8: bluez-5.50-a2dp-backports.patch
Patch8: bluez-5.50-a2dp-backports.patch
# PATCH-FIX-UPSTREAM tools: Fix build after y2038 changes in glibc
Patch9: 0001-tools-Fix-build-after-y2038-changes-in-glibc.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)
@ -165,6 +167,7 @@ desktop specific applets like blueman or GNOME or KDE applets).
%endif
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch101 -p1
%patch102 -p1
mkdir dbus-apis