Initial commit
This commit is contained in:
+33
@@ -0,0 +1,33 @@
|
||||
From 176230435cb4b64ff7f2d97f77a04579ad9ca239 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 18 Feb 2023 13:14:14 -0800
|
||||
Subject: [PATCH] Change SleepForMilliseconds parameter from unsigned int -> long
|
||||
|
||||
Fixes following error on 32bit platforms
|
||||
|
||||
src/googletest.h:631:35: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'long' in initializer list [-Wc++11-narrowing]
|
||||
const struct timespec req = {0, t * 1000 * 1000};
|
||||
^~~~~~~~~~~~~~~
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/google/glog/pull/894]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/googletest.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/googletest.h b/src/googletest.h
|
||||
index 5761361..836b06c 100644
|
||||
--- a/src/googletest.h
|
||||
+++ b/src/googletest.h
|
||||
@@ -625,7 +625,7 @@ class Thread {
|
||||
#endif
|
||||
};
|
||||
|
||||
-static inline void SleepForMilliseconds(unsigned t) {
|
||||
+static inline void SleepForMilliseconds(long t) {
|
||||
#ifndef GLOG_OS_WINDOWS
|
||||
# if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309L
|
||||
const struct timespec req = {0, t * 1000 * 1000};
|
||||
--
|
||||
2.39.2
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
From 19d00c15710840910a7397252c14d612746631fe Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 8 Mar 2021 14:58:40 -0800
|
||||
Subject: [PATCH] Link libexecinfo if its found, this is needed for musl based
|
||||
systems
|
||||
|
||||
Fixes
|
||||
ld: libglog.so.0.4.0: undefined reference to `backtrace'
|
||||
| collect2: error: ld returned 1 exit status
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
---
|
||||
CMakeLists.txt | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 846b444..1553358 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -162,6 +162,7 @@ cmake_pop_check_state ()
|
||||
check_cxx_symbol_exists (snprintf cstdio HAVE_SNPRINTF)
|
||||
|
||||
check_library_exists (dbghelp UnDecorateSymbolName "" HAVE_DBGHELP)
|
||||
+check_library_exists (execinfo backtrace "" HAVE_EXECINFO)
|
||||
|
||||
check_cxx_source_compiles ("
|
||||
#include <cstdlib>
|
||||
@@ -629,6 +630,10 @@ if (Unwind_FOUND)
|
||||
set (Unwind_DEPENDENCY "find_dependency (Unwind ${Unwind_VERSION})")
|
||||
endif (Unwind_FOUND)
|
||||
|
||||
+if (HAVE_EXECINFO)
|
||||
+ target_link_libraries (glog PUBLIC execinfo)
|
||||
+endif (HAVE_EXECINFO)
|
||||
+
|
||||
if (HAVE_DBGHELP)
|
||||
target_link_libraries (glog PRIVATE dbghelp)
|
||||
set (glog_libraries_options_for_static_linking "${glog_libraries_options_for_static_linking} -ldbghelp")
|
||||
Reference in New Issue
Block a user