summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2023-02-18 13:18:38 -0800
committerKhem Raj <raj.khem@gmail.com>2023-02-18 13:19:36 -0800
commit644889055152f3d2d27a048c716e45bba0c4d05f (patch)
tree58d314d36812fa7cdf2934719dd09399cbda4aa4
parent26fe378404f596263ed302488cf8d65d1b2b8dfa (diff)
downloadmeta-openembedded-644889055152f3d2d27a048c716e45bba0c4d05f.tar.gz
glog: Fix build with clang on 32bit platforms
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-support/glog/glog/0001-Change-SleepForMilliseconds-parameter-from-unsigned-.patch33
-rw-r--r--meta-oe/recipes-support/glog/glog_0.6.0.bb1
2 files changed, 34 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/glog/glog/0001-Change-SleepForMilliseconds-parameter-from-unsigned-.patch b/meta-oe/recipes-support/glog/glog/0001-Change-SleepForMilliseconds-parameter-from-unsigned-.patch
new file mode 100644
index 0000000000..3732c62cd0
--- /dev/null
+++ b/meta-oe/recipes-support/glog/glog/0001-Change-SleepForMilliseconds-parameter-from-unsigned-.patch
@@ -0,0 +1,33 @@
1From 176230435cb4b64ff7f2d97f77a04579ad9ca239 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 18 Feb 2023 13:14:14 -0800
4Subject: [PATCH] Change SleepForMilliseconds parameter from unsigned int -> long
5
6Fixes following error on 32bit platforms
7
8src/googletest.h:631:35: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'long' in initializer list [-Wc++11-narrowing]
9 const struct timespec req = {0, t * 1000 * 1000};
10 ^~~~~~~~~~~~~~~
11
12Upstream-Status: Submitted [https://github.com/google/glog/pull/894]
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 src/googletest.h | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/src/googletest.h b/src/googletest.h
19index 5761361..836b06c 100644
20--- a/src/googletest.h
21+++ b/src/googletest.h
22@@ -625,7 +625,7 @@ class Thread {
23 #endif
24 };
25
26-static inline void SleepForMilliseconds(unsigned t) {
27+static inline void SleepForMilliseconds(long t) {
28 #ifndef GLOG_OS_WINDOWS
29 # if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309L
30 const struct timespec req = {0, t * 1000 * 1000};
31--
322.39.2
33
diff --git a/meta-oe/recipes-support/glog/glog_0.6.0.bb b/meta-oe/recipes-support/glog/glog_0.6.0.bb
index 067e914aa2..89b7cfd184 100644
--- a/meta-oe/recipes-support/glog/glog_0.6.0.bb
+++ b/meta-oe/recipes-support/glog/glog_0.6.0.bb
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=dc9db360e0bbd4e46672f3fd91dd6c4b"
9SRC_URI = " \ 9SRC_URI = " \
10 git://github.com/google/glog.git;nobranch=1;protocol=https \ 10 git://github.com/google/glog.git;nobranch=1;protocol=https \
11 file://libexecinfo.patch \ 11 file://libexecinfo.patch \
12 file://0001-Change-SleepForMilliseconds-parameter-from-unsigned-.patch \
12" 13"
13 14
14SRCREV = "b33e3bad4c46c8a6345525fd822af355e5ef9446" 15SRCREV = "b33e3bad4c46c8a6345525fd822af355e5ef9446"