aports/testing/mongodb/30-fix-backtrace.patch
Filipp Andronov 11de19231c testing/mongodb: new aport
Things to be complete:
1. Build is only for x86_64, because I have to made a few hacks in code.
Most critical one is __ELF_NATIVE_CLASS
2. No tc-malloc. It doesnt build, so system allocator instead. Im working
on gpreftools package...
3. No heap usage statistics: always returns 0. It is broken in mongodb for
64bit architecture and also musl mallocinfo is not compatible with glibc.
So I just comment out heap reporting code, see comments in APKBUILD
4. Use more system libs, yaml & boost are from the top of my mind. Boost
make compilation fails, but should be easy to fix
5. Enable mongodb tests during build. Im just not sure how that should be
done in Alpine, i.e _where_ in build lifecycle tests should run
2015-06-27 20:36:57 +02:00

25 lines
641 B
Diff

--- orig/mongodb-src-r3.0.2/src/mongo/platform/backtrace.cpp
+++ mongodb-src-r3.0.2/src/mongo/platform/backtrace.cpp
@@ -28,6 +28,12 @@
#if !defined(_WIN32)
#if defined(__sunos__) || !defined(MONGO_HAVE_EXECINFO_BACKTRACE)
+// dlfcn.h requires _GNU_SOURCE to be defined in order to export
+// Dl_* structures. Issue gonna be addressed in 3.1.3, see SERVER-17199
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+
#include "mongo/platform/backtrace.h"
#include <boost/smart_ptr/scoped_array.hpp>
@@ -42,6 +48,8 @@
using std::string;
using std::vector;
+
+typedef Dl_info Dl_info_t;
namespace mongo {
namespace pal {