summaryrefslogtreecommitdiff
path: root/sci-libs/caffe2/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-09-05 10:24:06 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-09-05 10:24:06 +0100
commita0f09b2c947909b614c52fcfbdce964469404101 (patch)
tree675a5547be05cbc1b2f8a23d007dbf5ade80ffc7 /sci-libs/caffe2/files
parentdff5148a375dbe1b3ec2c5e5e4fa482bd1224c98 (diff)
gentoo auto-resync : 05:09:2022 - 10:24:06
Diffstat (limited to 'sci-libs/caffe2/files')
-rw-r--r--sci-libs/caffe2/files/caffe2-1.12.0-glog-0.6.0.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/sci-libs/caffe2/files/caffe2-1.12.0-glog-0.6.0.patch b/sci-libs/caffe2/files/caffe2-1.12.0-glog-0.6.0.patch
new file mode 100644
index 000000000000..a821ebedf7b7
--- /dev/null
+++ b/sci-libs/caffe2/files/caffe2-1.12.0-glog-0.6.0.patch
@@ -0,0 +1,29 @@
+https://github.com/pytorch/pytorch/issues/58054
+
+--- /c10/util/Logging.cpp
++++ /c10/util/Logging.cpp
+@@ -192,23 +192,13 @@
+ google::GLOG_WARNING,
+ "The minimum log level that caffe2 will output.");
+
+-// Google glog's api does not have an external function that allows one to check
+-// if glog is initialized or not. It does have an internal function - so we are
+-// declaring it here. This is a hack but has been used by a bunch of others too
+-// (e.g. Torch).
+-namespace google {
+-namespace glog_internal_namespace_ {
+-bool IsGoogleLoggingInitialized();
+-} // namespace glog_internal_namespace_
+-} // namespace google
+-
+ namespace c10 {
+ namespace {
+
+ void initGoogleLogging(char const* name) {
+ #if !defined(_MSC_VER)
+ // This trick can only be used on UNIX platforms
+- if (!::google::glog_internal_namespace_::IsGoogleLoggingInitialized())
++ if (!::google::IsGoogleLoggingInitialized())
+ #endif
+ {
+ ::google::InitGoogleLogging(name);