Skip to content

Commit c1ed7b1

Browse files
committed
workaround for Android platform building
Signed-off-by: GarfieldHan <2652609017@qq.com>
1 parent 10f810f commit c1ed7b1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Cargo.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,19 @@ libc = { version = "0.2.171", default-features = false }
5252
[target.'cfg(all(any(target_os = "linux"), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64")))))))'.dependencies]
5353
linux-raw-sys = { version = "0.11.0", default-features = false, features = ["general", "ioctl", "no_std"] }
5454

55+
# Workaround for Android
56+
[target.'cfg(target_os = "android")'.dependencies.linux-raw-sys]
57+
version = "0.11.0"
58+
features = [
59+
"auxvec",
60+
"errno",
61+
"general",
62+
"ioctl",
63+
"no_std",
64+
"elf",
65+
]
66+
default-features = false
67+
5568
# For the libc backend on Windows, use the Winsock API in windows-sys.
5669
[target.'cfg(windows)'.dependencies.windows-sys]
5770
version = ">=0.52, <0.62"

0 commit comments

Comments
 (0)