Closed Bug 1830530 Opened 2 years ago Closed 2 years ago

Don't use pthread_condattr_setclock hack on Android 6 32bit

Categories

(Core :: mozglue, defect)

Unspecified
Android
defect

Tracking

()

RESOLVED FIXED
115 Branch
Tracking Status
firefox114 --- wontfix
firefox115 --- fixed

People

(Reporter: m_kato, Assigned: m_kato)

References

Details

Attachments

(1 file)

https://searchfox.org/mozilla-central/rev/566f69826b829767d0373169eef6c50cc7d2241b/mozglue/misc/ConditionVariable_posix.cpp#23-28

Even if Android 32-bit, when minimal API is 21, this causes the following build error.

 0:01.07 /mozilla/mobile-aarch64/mozglue/misc/ConditionVariable_posix.cpp:144:7: error: use of undeclared identifier 'pthread_cond_timedwait_relative_np'; did you mean 'pthread_cond_timedwait_monotonic_np'?
 0:01.07   r = pthread_cond_timedwait_relative_np(ptCond, ptMutex, &rel_ts);
 0:01.08       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:01.08       pthread_cond_timedwait_monotonic_np
 0:01.08 /home/makoto/.mozbuild/android-ndk-r23c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/pthread.h:162:5: note: 'pthread_cond_timedwait_monotonic_np' declared here
 0:01.08 int pthread_cond_timedwait_monotonic_np(pthread_cond_t* __cond, pthread_mutex_t* __mutex,
 0:01.08     ^
 0:01.08 1 error generated.
Blocks: 1822171

From pthread.h in NDK r25c

#if __ANDROID_API__ < 21
...
  int pthread_cond_timedwait_relative_np(pthread_cond_t* __cond, pthread_mutex_t* __mutex, const struct timespec* __relative_timeout);
#endif

So we should use ANDROID_API instead of LP64.

Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/30db77f29d82 Set CV_USE_CLOCK_API if Android API is 21+. r=glandium
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: