summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-navigation
diff options
context:
space:
mode:
authorSean Nyekjaer <sean@geanix.com>2020-05-11 19:45:05 +0200
committerKhem Raj <raj.khem@gmail.com>2020-05-11 11:36:06 -0700
commitcecab9c4caee8e1d1f14acfae49d2dd8c66b5518 (patch)
treef4b50814df268f2966ef79950e5ebbb3e424e544 /meta-oe/recipes-navigation
parent7a1f41a6a0823e6ac7d5e44dba76ef9e7db3c47f (diff)
downloadmeta-openembedded-cecab9c4caee8e1d1f14acfae49d2dd8c66b5518.tar.gz
gpsd: Upgrade 3.19 -> 3.20
Revert "SConstruct: Add test for sizeof(time_t), result in SIZEOF_TIME_T." Do not cross-compile a small for it to be executed on the host. Signed-off-by: Sean Nyekjaer <sean@geanix.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-navigation')
-rw-r--r--meta-oe/recipes-navigation/gpsd/gpsd/0001-Revert-SConstruct-Add-test-for-sizeof-time_t-result-.patch108
-rw-r--r--meta-oe/recipes-navigation/gpsd/gpsd/0001-gps_shm_close-Free-privdata.patch37
-rw-r--r--meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb (renamed from meta-oe/recipes-navigation/gpsd/gpsd_3.19.bb)6
3 files changed, 111 insertions, 40 deletions
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd/0001-Revert-SConstruct-Add-test-for-sizeof-time_t-result-.patch b/meta-oe/recipes-navigation/gpsd/gpsd/0001-Revert-SConstruct-Add-test-for-sizeof-time_t-result-.patch
new file mode 100644
index 000000000..b021d0b72
--- /dev/null
+++ b/meta-oe/recipes-navigation/gpsd/gpsd/0001-Revert-SConstruct-Add-test-for-sizeof-time_t-result-.patch
@@ -0,0 +1,108 @@
1Subject: [PATCH] Revert "SConstruct: Add test for sizeof(time_t), result in
2 SIZEOF_TIME_T."
3
4This reverts commit b32ff1a86c44fa738dabaf63de1b5462e0071ad3.
5
6Upstream-Status: Inappropriate [cross-compile specific]
7
8---
9 SConstruct | 54 ++++--------------------------------------
10 android/gpsd_config.in | 1 -
11 2 files changed, 5 insertions(+), 50 deletions(-)
12
13diff --git a/SConstruct b/SConstruct
14index 33e0ff326..e3c62fa3c 100644
15--- a/SConstruct
16+++ b/SConstruct
17@@ -597,42 +597,6 @@ def CheckHeaderDefines(context, file, define):
18 return ret
19
20
21-def CheckSizeOf(context, type):
22- """Check sizeof 'type'"""
23- context.Message('Checking size of ' + type + '... ')
24-
25- program = """
26-#include <stdlib.h>
27-#include <stdio.h>
28-
29-/*
30- * The CheckSizeOf function does not have a way for the caller to
31- * specify header files to be included to provide the type being
32- * checked. As a workaround until that is remedied, include the
33- * header required for time_t, which is the sole current use of this
34- * function.
35- */
36-#include <time.h>
37-
38-int main() {
39- printf("%d", (int)sizeof(""" + type + """));
40- return 0;
41-}
42-"""
43-
44- # compile it
45- ret = context.TryCompile(program, '.c')
46- if 0 == ret:
47- announce('ERROR: TryCompile failed\n')
48- # fall back to sizeof(time_t) is 8
49- return '8'
50-
51- # run it
52- ret = context.TryRun(program, '.c')
53- context.Result(ret[0])
54- return ret[1]
55-
56-
57 def CheckCompilerDefines(context, define):
58 context.Message('Checking if compiler supplies %s... ' % (define,))
59 ret = context.TryLink("""
60@@ -703,15 +667,13 @@ env.Prepend(LIBPATH=[os.path.realpath(os.curdir)])
61
62 # CheckXsltproc works, but result is incorrectly saved as "no"
63 config = Configure(env, custom_tests={
64- 'CheckC11': CheckC11,
65- 'CheckCompilerDefines': CheckCompilerDefines,
66- 'CheckCompilerOption': CheckCompilerOption,
67- 'CheckHeaderDefines': CheckHeaderDefines,
68 'CheckPKG': CheckPKG,
69- 'CheckSizeOf': CheckSizeOf,
70 'CheckXsltproc': CheckXsltproc,
71- 'GetPythonValue': GetPythonValue,
72- })
73+ 'CheckCompilerOption': CheckCompilerOption,
74+ 'CheckCompilerDefines': CheckCompilerDefines,
75+ 'CheckC11': CheckC11,
76+ 'CheckHeaderDefines': CheckHeaderDefines,
77+ 'GetPythonValue': GetPythonValue})
78
79 # Use print, rather than announce, so we see it in -s mode.
80 print("This system is: %s" % sys.platform)
81@@ -1043,12 +1005,6 @@ else:
82 confdefs.append("/* #undef HAVE_%s_H */\n"
83 % hdr.replace("/", "_").upper())
84
85- sizeof_time_t = config.CheckSizeOf("time_t")
86- confdefs.append("#define SIZEOF_TIME_T %s\n" % sizeof_time_t)
87- announce("sizeof(time_t) is %s" % sizeof_time_t)
88- if 4 >= int(sizeof_time_t):
89- announce("WARNING: time_t is too small. It will fail in 2038")
90-
91 # check function after libraries, because some function require libraries
92 # for example clock_gettime() require librt on Linux glibc < 2.17
93 for f in ("cfmakeraw", "clock_gettime", "daemon", "fcntl", "fork",
94diff --git a/android/gpsd_config.in b/android/gpsd_config.in
95index 758251986..d240f6d34 100644
96--- a/android/gpsd_config.in
97+++ b/android/gpsd_config.in
98@@ -19,7 +19,6 @@
99 #define HAVE_ARPA_INET_H 1
100 #define HAVE_SYSLOG_H 1
101 #define HAVE_DAEMON 1
102-#define SIZEOF_TIME_T 8
103 #define HAVE_CLOCK_GETTIME 1
104 #define HAVE_STRPTIME 1
105 #define HAVE_GMTIME_R 1
106--
1072.26.2
108
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd/0001-gps_shm_close-Free-privdata.patch b/meta-oe/recipes-navigation/gpsd/gpsd/0001-gps_shm_close-Free-privdata.patch
deleted file mode 100644
index 9b3801580..000000000
--- a/meta-oe/recipes-navigation/gpsd/gpsd/0001-gps_shm_close-Free-privdata.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1From 2a4b3bcde0d73a3a4a6644d5f944ac9d16023ba9 Mon Sep 17 00:00:00 2001
2From: Adrian Bunk <bunk@stusta.de>
3Date: Mon, 21 Oct 2019 13:53:25 +0300
4Subject: gps_shm_close: Free privdata
5
6Previously every open/close cycle leaked privdata.
7
8Signed-off-by: Adrian Bunk <bunk@stusta.de>
9Signed-off-by: Gary E. Miller <gem@rellim.com>
10
11Upstream-Status: Backport
12---
13 libgps_shm.c | 8 ++++++--
14 1 file changed, 6 insertions(+), 2 deletions(-)
15
16diff --git a/libgps_shm.c b/libgps_shm.c
17index d93972bba..12bb3760b 100644
18--- a/libgps_shm.c
19+++ b/libgps_shm.c
20@@ -163,8 +163,12 @@ int gps_shm_read(struct gps_data_t *gpsdata)
21
22 void gps_shm_close(struct gps_data_t *gpsdata)
23 {
24- if (PRIVATE(gpsdata) && PRIVATE(gpsdata)->shmseg != NULL)
25- (void)shmdt((const void *)PRIVATE(gpsdata)->shmseg);
26+ if (PRIVATE(gpsdata)) {
27+ if (PRIVATE(gpsdata)->shmseg != NULL)
28+ (void)shmdt((const void *)PRIVATE(gpsdata)->shmseg);
29+ free(PRIVATE(gpsdata));
30+ gpsdata->privdata = NULL;
31+ }
32 }
33
34 int gps_shm_mainloop(struct gps_data_t *gpsdata, int timeout,
35--
362.20.1
37
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_3.19.bb b/meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb
index f74ebda5f..0914f7ec2 100644
--- a/meta-oe/recipes-navigation/gpsd/gpsd_3.19.bb
+++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb
@@ -7,10 +7,10 @@ PROVIDES = "virtual/gpsd"
7 7
8SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \ 8SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \
9 file://0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch \ 9 file://0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch \
10 file://0001-gps_shm_close-Free-privdata.patch \ 10 file://0001-Revert-SConstruct-Add-test-for-sizeof-time_t-result-.patch \
11" 11"
12SRC_URI[md5sum] = "b3bf88706794eb8e5f2c2543bf7ba87b" 12SRC_URI[md5sum] = "cf7fdec7ce7221d20bee1a7246362b05"
13SRC_URI[sha256sum] = "27dd24d45b2ac69baab7933da2bf6ae5fb0be90130f67e753c110a3477155f39" 13SRC_URI[sha256sum] = "172a7805068eacb815a3c5225436fcb0be46e7e49a5001a94034eac43df85e50"
14 14
15inherit scons update-rc.d python3-dir python3native systemd update-alternatives 15inherit scons update-rc.d python3-dir python3native systemd update-alternatives
16 16