diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2019-08-28 15:28:37 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-08-30 17:10:28 +0100 |
commit | c5a7f3eac647049d07c31d4533d4ffb158f93088 (patch) | |
tree | d1a33b7d4d77d230de62b99bd2e47330b476065c /meta | |
parent | 7e01f2fdad4b3abedcd86e2d106bc362ef23097f (diff) | |
download | poky-c5a7f3eac647049d07c31d4533d4ffb158f93088.tar.gz |
bluez5: fix build against libc-headers 5.2+
Backporting the following upstream commit to fix the build against
kernel 5.2+ headers:
[
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.
]
Upstream-Status: backport commit f36f71f60b1e68c0f12e615b9b128d089ec3dd19
(From OE-Core rev: b4731a1202cfa45c7e1f635552398b89a37f2eeb)
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-connectivity/bluez5/bluez5.inc | 1 | ||||
-rw-r--r-- | meta/recipes-connectivity/bluez5/bluez5/0001-tools-Fix-build-after-y2038-changes-in-glibc.patch | 68 |
2 files changed, 69 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc b/meta/recipes-connectivity/bluez5/bluez5.inc index bffd174c0a..6c79ed0606 100644 --- a/meta/recipes-connectivity/bluez5/bluez5.inc +++ b/meta/recipes-connectivity/bluez5/bluez5.inc | |||
@@ -57,6 +57,7 @@ SRC_URI = "\ | |||
57 | file://0001-Makefile.am-Fix-a-race-issue-for-tools.patch \ | 57 | file://0001-Makefile.am-Fix-a-race-issue-for-tools.patch \ |
58 | file://CVE-2018-10910.patch \ | 58 | file://CVE-2018-10910.patch \ |
59 | file://gcc9-fixes.patch \ | 59 | file://gcc9-fixes.patch \ |
60 | file://0001-tools-Fix-build-after-y2038-changes-in-glibc.patch \ | ||
60 | " | 61 | " |
61 | S = "${WORKDIR}/bluez-${PV}" | 62 | S = "${WORKDIR}/bluez-${PV}" |
62 | 63 | ||
diff --git a/meta/recipes-connectivity/bluez5/bluez5/0001-tools-Fix-build-after-y2038-changes-in-glibc.patch b/meta/recipes-connectivity/bluez5/bluez5/0001-tools-Fix-build-after-y2038-changes-in-glibc.patch new file mode 100644 index 0000000000..9ca20ae53b --- /dev/null +++ b/meta/recipes-connectivity/bluez5/bluez5/0001-tools-Fix-build-after-y2038-changes-in-glibc.patch | |||
@@ -0,0 +1,68 @@ | |||
1 | From f36f71f60b1e68c0f12e615b9b128d089ec3dd19 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bastien Nocera <hadess@hadess.net> | ||
3 | Date: Fri, 7 Jun 2019 09:51:33 +0200 | ||
4 | Subject: [PATCH] tools: Fix build after y2038 changes in glibc | ||
5 | |||
6 | The 32-bit SIOCGSTAMP has been deprecated. Use the deprecated name | ||
7 | to fix the build. | ||
8 | |||
9 | Upstream-Status: backport commit f36f71f60b1e68c0f12e615b9b128d089ec3dd19 | ||
10 | |||
11 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
12 | |||
13 | --- | ||
14 | tools/l2test.c | 6 +++++- | ||
15 | tools/rctest.c | 6 +++++- | ||
16 | 2 files changed, 10 insertions(+), 2 deletions(-) | ||
17 | |||
18 | diff --git a/tools/l2test.c b/tools/l2test.c | ||
19 | index e755ac881..e787c2ce2 100644 | ||
20 | --- a/tools/l2test.c | ||
21 | +++ b/tools/l2test.c | ||
22 | @@ -55,6 +55,10 @@ | ||
23 | #define BREDR_DEFAULT_PSM 0x1011 | ||
24 | #define LE_DEFAULT_PSM 0x0080 | ||
25 | |||
26 | +#ifndef SIOCGSTAMP_OLD | ||
27 | +#define SIOCGSTAMP_OLD SIOCGSTAMP | ||
28 | +#endif | ||
29 | + | ||
30 | /* Test modes */ | ||
31 | enum { | ||
32 | SEND, | ||
33 | @@ -907,7 +911,7 @@ static void recv_mode(int sk) | ||
34 | if (timestamp) { | ||
35 | struct timeval tv; | ||
36 | |||
37 | - if (ioctl(sk, SIOCGSTAMP, &tv) < 0) { | ||
38 | + if (ioctl(sk, SIOCGSTAMP_OLD, &tv) < 0) { | ||
39 | timestamp = 0; | ||
40 | memset(ts, 0, sizeof(ts)); | ||
41 | } else { | ||
42 | diff --git a/tools/rctest.c b/tools/rctest.c | ||
43 | index 94490f462..bc8ed875d 100644 | ||
44 | --- a/tools/rctest.c | ||
45 | +++ b/tools/rctest.c | ||
46 | @@ -50,6 +50,10 @@ | ||
47 | |||
48 | #include "src/shared/util.h" | ||
49 | |||
50 | +#ifndef SIOCGSTAMP_OLD | ||
51 | +#define SIOCGSTAMP_OLD SIOCGSTAMP | ||
52 | +#endif | ||
53 | + | ||
54 | /* Test modes */ | ||
55 | enum { | ||
56 | SEND, | ||
57 | @@ -505,7 +509,7 @@ static void recv_mode(int sk) | ||
58 | if (timestamp) { | ||
59 | struct timeval tv; | ||
60 | |||
61 | - if (ioctl(sk, SIOCGSTAMP, &tv) < 0) { | ||
62 | + if (ioctl(sk, SIOCGSTAMP_OLD, &tv) < 0) { | ||
63 | timestamp = 0; | ||
64 | memset(ts, 0, sizeof(ts)); | ||
65 | } else { | ||
66 | -- | ||
67 | 2.19.1 | ||
68 | |||