-
-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lockf() is available now on Android API level 24, but the F_LOCK macro is not defined #72948
Comments
The patch fixes the following error: ====================================================================== Traceback (most recent call last):
File "/sdcard/org.bitbucket.pyona/lib/python3.7/test/test_posix.py", line 195, in test_lockf
posix.lockf(fd, posix.F_LOCK, 4)
AttributeError: module 'posix' has no attribute 'F_LOCK' |
FYI: Since Android NDK r14 beta1, F_LOCK is defined in unified headers. [1] In $ANDROID_NDK/sysroot/usr/include/bits/lockf.h: #define F_ULOCK 0
#define F_LOCK 1
#define F_TLOCK 2
#define F_TEST 3 [1] https://android.googlesource.com/platform/ndk.git/+/master/docs/UnifiedHeaders.md |
Do you mean that the patch adds posix.F_LOCK constant on Android? |
No, the patch prevents posix.flock() to be defined on Android API 24 with android-ndk-r13. But I plan to change it so that the test is skipped when posix does not have the F_LOCK attribute as this problem is not worth a change in the build machinery. It makes even more sense now that android-ndk-r14 will be released with "Unified Headers". BTW thanks Chi Hsuan Yen for this important information. |
Oh ok, the issue is more subtle than what I understood. I reviewed test_posix_flock.patch and proposed some changes to the comment/doc. |
Thanks for the review Victor. I have created bpo-29040: building Android with android-ndk-r14. |
New patch. |
The new patch now looks good to me. |
New changeset 51b09b10d4f8 by Xavier de Gaye in branch '3.6': New changeset 146157d91283 by Xavier de Gaye in branch 'default': |
This change is not needed anymore now that Unified Headers are supported by android-ndk-r14 (see bpo-29040) |
Misc/NEWS
so that it is managed by towncrier #552Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: