mcst-linux-kernel/patches-2024.06.26/mongodb-3.6.13/0008-undef-ref-atomic-bug15...

23 lines
938 B
Diff

Subject: fix undefined reference to ~atomic() and others
Bug: 151685
Tags: lcc
diff -rupN a/src/mongo/util/heap_profiler.cpp b/src/mongo/util/heap_profiler.cpp
--- a/src/mongo/util/heap_profiler.cpp 2024-05-28 23:12:56.903985720 +0300
+++ b/src/mongo/util/heap_profiler.cpp 2024-05-28 23:13:24.063726135 +0300
@@ -618,7 +618,14 @@ public:
static bool enabledParameter;
static long long sampleIntervalBytesParameter;
+#if defined(__LCC__) && (__LCC__ >= 128)
+ HeapProfiler() : bytesAllocated{0},
+ stackHashTable{kMaxStackInfos, kStackHashTableLoadFactor},
+ objHashTable{kMaxObjInfos, kObjHashTableLoadFactor},
+ importantStacks{[](StackInfo* a, StackInfo* b) -> bool { return a->stackNum < b->stackNum; }} {
+#else
HeapProfiler() {
+#endif
// Set sample interval from the parameter.
sampleIntervalBytes = sampleIntervalBytesParameter;