blob: 098306f50021127931d0ec3a8c03849f863ca5c5 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001From df7ef16afcc6ab55daa686e4f15c16e3d1280337 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 2/4] 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>
9---
10 src/mongo/util/stacktrace_posix.cpp | 9 +++++++++
11 1 file changed, 9 insertions(+)
12
13diff --git a/src/mongo/util/stacktrace_posix.cpp b/src/mongo/util/stacktrace_posix.cpp
14index 53ab85f56f..7c458e7ef2 100644
15--- a/src/mongo/util/stacktrace_posix.cpp
16+++ b/src/mongo/util/stacktrace_posix.cpp
17@@ -37,6 +37,15 @@
18 #include <string>
19 #include <sys/utsname.h>
20
21+#if !defined(__GLIBC__)
22+#if defined __x86_64__ && !defined __ILP32__
23+# define __WORDSIZE 64
24+#else
25+# define __WORDSIZE 32
26+#endif
27+#define __ELF_NATIVE_CLASS __WORDSIZE
28+#endif
29+
30 #include "mongo/base/init.h"
31 #include "mongo/config.h"
32 #include "mongo/db/jsobj.h"
33--
342.14.1
35