From 8400c587ff0b49fbc2501db97978168834c834e8 Mon Sep 17 00:00:00 2001 From: Shawn Huang Date: Fri, 19 Jul 2013 10:10:00 -0400 Subject: [PATCH] Bug 884239 - Remove the wrapper function of timer_create if ANDROID_VERSION is greater than JB MR1. r=mwu --- mozglue/build/BionicGlue.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mozglue/build/BionicGlue.cpp b/mozglue/build/BionicGlue.cpp index 46ca2c3d6b66..062faadf7c4a 100644 --- a/mozglue/build/BionicGlue.cpp +++ b/mozglue/build/BionicGlue.cpp @@ -15,6 +15,7 @@ #define NS_EXPORT __attribute__ ((visibility("default"))) +#if ANDROID_VERSION < 17 || defined(MOZ_WIDGET_ANDROID) /* Android doesn't have pthread_atfork(), so we need to use our own. */ struct AtForkFuncs { void (*prepare)(void); @@ -59,11 +60,13 @@ private: }; static std::vector > atfork; +#endif #ifdef MOZ_WIDGET_GONK #include "cpuacct.h" #define WRAP(x) x +#if ANDROID_VERSION < 17 || defined(MOZ_WIDGET_ANDROID) extern "C" NS_EXPORT int timer_create(clockid_t, struct sigevent*, timer_t*) { @@ -71,12 +74,14 @@ timer_create(clockid_t, struct sigevent*, timer_t*) abort(); return -1; } +#endif #else #define cpuacct_add(x) #define WRAP(x) __wrap_##x #endif +#if ANDROID_VERSION < 17 || defined(MOZ_WIDGET_ANDROID) extern "C" NS_EXPORT int WRAP(pthread_atfork)(void (*prepare)(void), void (*parent)(void), void (*child)(void)) { @@ -117,6 +122,7 @@ WRAP(fork)(void) } return pid; } +#endif extern "C" NS_EXPORT int WRAP(raise)(int sig)