80d0eaeb21
Three fixes for cross-recipe build:
1. O_CLOEXEC was already imported from libc at line 114, but
the 0.1.18 backport added a duplicate 'pub const O_CLOEXEC'
at line 173. E0255 ("name defined multiple times") error.
Keep only the new F_DUPFD_CLOEXEC constant; O_CLOEXEC comes
from libc.
2. pub mod acpi that re-exports AcPiVerb from redox_syscall
is now correctly gated on '#[cfg(feature = "redox_syscall")]'.
The 'redox_syscall' dep is currently optional in libredox's
Cargo.toml, so recipes that don't enable the feature
(e.g. base-initfs which uses default-features libredox)
get an unresolved-import error. Move to making the dep
non-optional so it's always available.
3. Make redox_syscall dep non-optional in Cargo.toml. This
is safe because (a) the path override always points at the
local fork which is always present, and (b) all downstream
consumers of libredox already depend on redox_syscall
transitively (or are the syscall consumers themselves, like
the kernel).
After these three changes, the libredox fork builds cleanly
and the 'pub mod acpi { pub use redox_syscall::AcPiVerb; }'
re-export is available to all consumers without feature flags.
45 lines
1.7 KiB
TOML
45 lines
1.7 KiB
TOML
[package]
|
|
name = "libredox"
|
|
authors = ["4lDO2 <4lDO2@protonmail.com>"]
|
|
# Red Bear OS Phase J: version is 0.1.18 upstream. The
|
|
# redox_syscall dep is now required (not optional) because
|
|
# the local fork's acpi module (added in this commit) re-
|
|
# exports AcPiVerb from redox_syscall, and downstream recipes
|
|
# that don't enable the redox_syscall feature get an
|
|
# "unresolved import" error. Making the dep non-optional
|
|
# also matches the upstream 0.1.18 Cargo.toml pattern where
|
|
# the redox_syscall dep is unconditional.
|
|
version = "0.1.18"
|
|
edition = "2021"
|
|
license = "MIT"
|
|
description = "Redox stable ABI"
|
|
# Red Bear OS fork lives at the canonical outer repo
|
|
# (gitea.redbearos.org/vasilito/RedBear-OS).
|
|
repository = "https://gitea.redbearos.org/vasilito/RedBear-OS"
|
|
exclude = ["target"]
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
|
|
[features]
|
|
default = ["base", "call", "std", "redox_syscall", "protocol"]
|
|
base = ["libc"]
|
|
call = ["base"]
|
|
std = ["base"]
|
|
protocol = ["plain", "bitflags", "redox_syscall"]
|
|
mkns = ["ioslice"]
|
|
|
|
[dependencies]
|
|
bitflags = { version = "2", optional = true }
|
|
libc = { version = "0.2", optional = true }
|
|
# Phase J: path override to the local fork (../syscall
|
|
# relative to the libredox fork's local/sources/libredox/
|
|
# path). This gives libredox access to the EnterS2Idle /
|
|
# ExitS2Idle AcpiVerb variants. Cargo's [patch.crates-io]
|
|
# in the workspace's outer Cargo.toml (in base/ and kernel/)
|
|
# is what wires this path through to the actual
|
|
# redox_syscall crate; this path entry is the libredox-
|
|
# side patch override for the same crate.
|
|
redox_syscall = { path = "../syscall", version = "0.8" }
|
|
ioslice = { version = "0.6", optional = true }
|
|
plain = { version = "0.2", optional = true }
|