ndk-patches: make futimes, lutimes and futimesat visible in sys/time.h
We now have libandroid-utimes which provides these functions, so update header to reflect this. Normally the android libc only supports these functions for api level >=26, but we support api level >= 24. The futimesat function also takes an extra argument compared to bionic one: int flags, due to that unar expects that type of futimesat function. We can add another futimesat variant (without flags) when it is needed.
This commit is contained in:
parent
93004a3ef5
commit
fbc59da08d
|
@ -0,0 +1,26 @@
|
|||
--- ./usr/include/sys/time.h.orig 2024-03-21 21:20:39.291006515 +0000
|
||||
+++ ./usr/include/sys/time.h 2024-03-23 15:15:08.754434710 +0000
|
||||
@@ -48,10 +48,8 @@
|
||||
|
||||
#if defined(__USE_BSD)
|
||||
|
||||
-#if __ANDROID_API__ >= 26
|
||||
-int futimes(int __fd, const struct timeval __times[_Nullable 2]) __INTRODUCED_IN(26);
|
||||
-int lutimes(const char* _Nonnull __path, const struct timeval __times[_Nullable 2]) __INTRODUCED_IN(26);
|
||||
-#endif /* __ANDROID_API__ >= 26 */
|
||||
+int futimes(int __fd, const struct timeval __times[_Nullable 2]);
|
||||
+int lutimes(const char* _Nonnull __path, const struct timeval __times[_Nullable 2]);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -70,9 +68,7 @@
|
||||
* Available since API level 26.
|
||||
*/
|
||||
|
||||
-#if __ANDROID_API__ >= 26
|
||||
-int futimesat(int __dir_fd, const char* __BIONIC_COMPLICATED_NULLNESS __path, const struct timeval __times[_Nullable 2]) __INTRODUCED_IN(26);
|
||||
-#endif /* __ANDROID_API__ >= 26 */
|
||||
+int futimesat(int __dir_fd, const char* __BIONIC_COMPLICATED_NULLNESS __path, const struct timeval __times[_Nullable 2], int flags);
|
||||
|
||||
#endif
|
||||
|
|
@ -7,7 +7,7 @@ termux_step_setup_toolchain() {
|
|||
# toolchain setup to ensure that everyone gets an updated
|
||||
# toolchain
|
||||
if [ "${TERMUX_NDK_VERSION}" = "26b" ]; then
|
||||
TERMUX_STANDALONE_TOOLCHAIN+="-v1"
|
||||
TERMUX_STANDALONE_TOOLCHAIN+="-v2"
|
||||
termux_setup_toolchain_26b
|
||||
elif [ "${TERMUX_NDK_VERSION}" = 23c ]; then
|
||||
TERMUX_STANDALONE_TOOLCHAIN+="-v6"
|
||||
|
|
Loading…
Reference in New Issue