diff options
Diffstat (limited to 'src/common/android/include/ucontext.h')
-rw-r--r-- | src/common/android/include/ucontext.h | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/common/android/include/ucontext.h b/src/common/android/include/ucontext.h index 6608e063..29db8ade 100644 --- a/src/common/android/include/ucontext.h +++ b/src/common/android/include/ucontext.h @@ -30,12 +30,27 @@ #ifndef GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_UCONTEXT_H #define GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_UCONTEXT_H +#include <sys/cdefs.h> + +#ifdef __BIONIC_UCONTEXT_H +#include <ucontext.h> +#else + #include <sys/ucontext.h> -// TODO: Provide a portable implementation of getcontext() then -// update ExceptionHandler::WriteMinidump() in -// src/client/linux/handler/exception_handler.cc to use it. -// -// extern int getcontext(ucontext_t* ucp); +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +// Provided by src/android/common/breakpad_getcontext.S +int breakpad_getcontext(ucontext_t* ucp); + +#define getcontext(x) breakpad_getcontext(x) + +#ifdef __cplusplus +} // extern "C" +#endif // __cplusplus + +#endif // __BIONIC_UCONTEXT_H #endif // GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_UCONTEXT_H |