mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-02 07:27:49 +00:00
bluez: fix 5.2-rc1
This commit is contained in:
parent
5c3e617c8a
commit
36f160e800
@ -0,0 +1,63 @@
|
||||
From 6291800ff8cd59b51411f904685db3ecb2e322ff Mon Sep 17 00:00:00 2001
|
||||
From: Bastien Nocera <hadess () hadess ! net>
|
||||
Date: Fri, 7 Jun 2019 07:51:33 +0000
|
||||
Subject: [PATCH] tools: Fix build after y2038 changes in glibc
|
||||
|
||||
The 32-bit SIOCGSTAMP has been deprecated. Use the deprecated name
|
||||
to fix the build.
|
||||
---
|
||||
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 1819423..400ac4a 100644
|
||||
--- a/tools/l2test.c
|
||||
+++ b/tools/l2test.c
|
||||
@@ -54,6 +54,10 @@
|
||||
#define BREDR_DEFAULT_PSM 0x1011
|
||||
#define LE_DEFAULT_PSM 0x0080
|
||||
|
||||
+#ifndef SIOCGSTAMP_OLD
|
||||
+#define SIOCGSTAMP_OLD SIOCGSTAMP
|
||||
+#endif
|
||||
+
|
||||
/* Test modes */
|
||||
enum {
|
||||
SEND,
|
||||
@@ -906,7 +910,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 6d84e07..6a2bd55 100644
|
||||
--- a/tools/rctest.c
|
||||
+++ b/tools/rctest.c
|
||||
@@ -49,6 +49,10 @@
|
||||
|
||||
#include "src/shared/util.h"
|
||||
|
||||
+#ifndef SIOCGSTAMP_OLD
|
||||
+#define SIOCGSTAMP_OLD SIOCGSTAMP
|
||||
+#endif
|
||||
+
|
||||
/* Test modes */
|
||||
enum {
|
||||
SEND,
|
||||
@@ -504,7 +508,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.14.1
|
||||
|
Loading…
x
Reference in New Issue
Block a user