android / ndk

The Android Native Development Kit
2.01k stars 257 forks source link

Removal of linux/android_alarm.h from NDK 14 onwards #347

Closed mikebarber closed 7 years ago

mikebarber commented 7 years ago

Description

Building PJSIP's Open source multimedia communication library and when moving to the latest NDK 14b found it did not build as linux/android-alarm.h was missing. Had been using NDK 14 beta2 with no problem

The function used from that header is ANDROID_ALARM_GET_TIME(ANDROID_ALARM_ELAPSED_REALTIME)

Is this an omission from the NDK or has access to this functionality been removed and if so is there a workaround

Environment Details

enh commented 7 years ago

this functionality has been removed from the kernel for a while now.

it looks like the Android-specific code in pjlib/src/pj/os_timestamp_posix.c should just be deleted; Android should be fine with the POSIX section below that instead.

enh commented 7 years ago

(the Android code basically has a copy of the POSIX code as its fallback path, so you're just running a slow version of the POSIX code right now on the latest devices :-) )

mikebarber commented 7 years ago

Thanks enh for the info I have patched as above and passed this info on to PJSIP support

ghost commented 7 years ago

thanks