| 1 |
nix 0.22 deprecated as_errno and made it into a no-op |
| 2 |
nix 0.26 removed it. |
| 3 |
|
| 4 |
nix 0.27 stopped enabling stuff by default, requring features to be enabled |
| 5 |
explicitly. These features existed starting in nix 0.24. |
| 6 |
|
| 7 |
Index: libmount/Cargo.toml |
| 8 |
=================================================================== |
| 9 |
--- libmount.orig/Cargo.toml |
| 10 |
+++ libmount/Cargo.toml |
| 11 |
@@ -28,7 +28,8 @@ path = "src/lib.rs" |
| 12 |
version = "0.2.28" |
| 13 |
|
| 14 |
[dependencies.nix] |
| 15 |
-version = "0.14" |
| 16 |
+version = ">= 0.24, < 1.0" |
| 17 |
+features = ["user", "mount"] |
| 18 |
|
| 19 |
[dependencies.quick-error] |
| 20 |
version = "2.0" |
| 21 |
Index: libmount/src/lib.rs |
| 22 |
=================================================================== |
| 23 |
--- libmount.orig/src/lib.rs |
| 24 |
+++ libmount/src/lib.rs |
| 25 |
@@ -85,7 +85,7 @@ impl OSError { |
| 26 |
fn from_nix(err: nix::Error, explain: Box<Explainable>) -> OSError { |
| 27 |
OSError( |
| 28 |
MountError::Io( |
| 29 |
- err.as_errno().map_or_else(|| io::Error::new(io::ErrorKind::Other, err), io::Error::from), |
| 30 |
+ io::Error::from(err), |
| 31 |
), |
| 32 |
explain, |
| 33 |
) |