Skip to content

Fixed bug for Android compilation#126

Open
FalsinSoft wants to merge 2 commits intoip7z:mainfrom
FalsinSoft:main
Open

Fixed bug for Android compilation#126
FalsinSoft wants to merge 2 commits intoip7z:mainfrom
FalsinSoft:main

Conversation

@FalsinSoft
Copy link
Copy Markdown

Android NDK define TIME_UTC but doesn't have the timespec_get() function than the compilation fails. This patch add a flag to check if the compilation is on Android.

@FalsinSoft
Copy link
Copy Markdown
Author

Hi, are you interested in this patch? If not I can remove...

Copy link
Copy Markdown

@gyurix gyurix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reasonable bug report, patch is too blunt.

#if defined(TIME_UTC) && !defined(__ANDROID__) fixes one Android toolchain case by disabling timespec_get() on all Android targets. That can become wrong again as NDK/API availability changes.

Merge readiness: 5/10. Before merge: gate on actual function availability / API level instead of platform-wide __ANDROID__, or at least document tested Android NDK range.

@FalsinSoft
Copy link
Copy Markdown
Author

After some serach it seems timespec_get() is available from android SDK version 29 and above so the updated patch should work. Tested using SDK version 36 and it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants