mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-09 03:54:17 +08:00
Changed: Add general compatibility fixes for minSdkVerion
21
This commit is contained in:
@@ -32,8 +32,11 @@ package com.termux.shared.file.filesystem;
|
||||
// Those constants are initialized by native code to ensure correctness on different architectures.
|
||||
// AT_SYMLINK_NOFOLLOW (used by fstatat) and AT_REMOVEDIR (used by unlinkat) as of July 2018 do not
|
||||
// have equivalents in android.system.OsConstants so left unchanged.
|
||||
import android.os.Build;
|
||||
import android.system.OsConstants;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
/**
|
||||
* https://cs.android.com/android/platform/superproject/+/android-11.0.0_r3:libcore/ojluni/src/main/java/sun/nio/fs/UnixConstants.java
|
||||
*/
|
||||
@@ -56,7 +59,11 @@ public class UnixConstants {
|
||||
|
||||
static final int O_SYNC = OsConstants.O_SYNC;
|
||||
|
||||
static final int O_DSYNC = OsConstants.O_DSYNC;
|
||||
// Crash on Android 5.
|
||||
// No static field O_DSYNC of type I in class Landroid/system/OsConstants; or its superclasses
|
||||
// (declaration of 'android.system.OsConstants' appears in /system/framework/core-libart.jar)
|
||||
//@RequiresApi(Build.VERSION_CODES.O_MR1)
|
||||
//static final int O_DSYNC = OsConstants.O_DSYNC;
|
||||
|
||||
static final int O_NOFOLLOW = OsConstants.O_NOFOLLOW;
|
||||
|
||||
|
Reference in New Issue
Block a user