Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | From df7ef16afcc6ab55daa686e4f15c16e3d1280337 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sat, 2 Sep 2017 12:42:30 -0700 |
| 4 | Subject: [PATCH 2/4] Add a definition for the macro __ELF_NATIVE_CLASS |
| 5 | |
| 6 | It depends on the native arch's word size. |
| 7 | |
| 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 9 | --- |
| 10 | src/mongo/util/stacktrace_posix.cpp | 9 +++++++++ |
| 11 | 1 file changed, 9 insertions(+) |
| 12 | |
| 13 | diff --git a/src/mongo/util/stacktrace_posix.cpp b/src/mongo/util/stacktrace_posix.cpp |
| 14 | index 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 | -- |
| 34 | 2.14.1 |
| 35 | |