blob: 869d2849dfe2dbc6e122b0423f77829249ee6769 [file] [log] [blame]
Brad Bishop0a921262019-09-24 07:40:45 -04001From 73c6374ceb0c062e91210cc9ef3e0e9fa30ee514 Mon Sep 17 00:00:00 2001
Brad Bishopd7bf8c12018-02-25 22:55:05 -05002From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 2 Sep 2017 12:42:30 -0700
Brad Bishop0a921262019-09-24 07:40:45 -04004Subject: [PATCH 04/10] Add a definition for the macro __ELF_NATIVE_CLASS
Brad Bishopd7bf8c12018-02-25 22:55:05 -05005
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
Brad Bishop0a921262019-09-24 07:40:45 -040014index 1d7b3d7..f81e329 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -050015--- a/src/mongo/util/stacktrace_posix.cpp
16+++ b/src/mongo/util/stacktrace_posix.cpp
Brad Bishop0a921262019-09-24 07:40:45 -040017@@ -39,6 +39,15 @@
Brad Bishopd7bf8c12018-02-25 22:55:05 -050018 #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--
Brad Bishop0a921262019-09-24 07:40:45 -0400342.7.4
Brad Bishopd7bf8c12018-02-25 22:55:05 -050035