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