hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From 28f34191eef1e70c24d2f81b66e4dd40dbefcd35 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 2 Sep 2017 12:42:30 -0700
Subject: [PATCH 04/10] Add a definition for the macro __ELF_NATIVE_CLASS
 
It depends on the native arch's word size.
 
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Vincent Prince <vincent.prince.fr@gmail.com>
---
 src/mongo/util/stacktrace_posix.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)
 
diff --git a/src/mongo/util/stacktrace_posix.cpp b/src/mongo/util/stacktrace_posix.cpp
index 531e21bdc2..fa611499e4 100644
--- a/src/mongo/util/stacktrace_posix.cpp
+++ b/src/mongo/util/stacktrace_posix.cpp
@@ -42,6 +42,15 @@
 #include <iostream>
 #include <string>
 
+#if !defined(__GLIBC__)
+#if defined __x86_64__ && !defined __ILP32__
+# define __WORDSIZE    64
+#else
+# define __WORDSIZE    32
+#endif
+#define __ELF_NATIVE_CLASS __WORDSIZE
+#endif
+
 #include "mongo/base/init.h"
 #include "mongo/bson/json.h"
 #include "mongo/config.h"
-- 
2.24.0