File: zerocopy-0.8.patch

package info (click to toggle)
rust-utmp-classic-raw 0.1.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 132 kB
  • sloc: makefile: 4
file content (54 lines) | stat: -rw-r--r-- 1,502 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -30,5 +30,5 @@ repository = "https://github.com/jadijad
 version = "1.0.0"
 
 [dependencies.zerocopy]
-version = "0.7.34"
+version = "0.8"
 features = ["derive"]
--- a/src/x32.rs
+++ b/src/x32.rs
@@ -1,8 +1,8 @@
 use super::{cstr_from_bytes, UT_HOSTSIZE, UT_LINESIZE, UT_NAMESIZE};
 use std::fmt;
-use zerocopy::{FromZeroes, FromBytes};
+use zerocopy::{FromBytes, Immutable, KnownLayout};
 
-#[derive(FromZeroes, FromBytes, Clone, Copy, Debug)]
+#[derive(FromBytes, Immutable, KnownLayout, Clone, Copy, Debug)]
 #[repr(C)]
 pub struct timeval {
     /// Seconds
@@ -12,7 +12,7 @@ pub struct timeval {
 }
 
 
-#[derive(FromZeroes, Clone, Copy, FromBytes)]
+#[derive(Clone, Copy, FromBytes, Immutable, KnownLayout)]
 #[repr(C)]
 pub struct utmp {
     /// Device name of tty - `"/dev/"`
--- a/src/x64.rs
+++ b/src/x64.rs
@@ -1,9 +1,9 @@
 use super::{cstr_from_bytes, UT_HOSTSIZE, UT_LINESIZE, UT_NAMESIZE};
 use std::fmt;
-use zerocopy::{FromZeroes, FromBytes};
+use zerocopy::{FromBytes, Immutable, KnownLayout};
 
 #[repr(C)]
-#[derive(Clone, Copy, Debug, FromZeroes, FromBytes)]
+#[derive(Clone, Copy, Debug, FromBytes, Immutable, KnownLayout)]
 pub struct timeval {
     /// Seconds
     pub tv_sec: i64,
@@ -12,7 +12,7 @@ pub struct timeval {
 }
 
 #[repr(C)]
-#[derive(Clone, Copy, FromZeroes, FromBytes)]
+#[derive(Clone, Copy, FromBytes, Immutable, KnownLayout)]
 pub struct utmp {
     /// Device name of tty - `"/dev/"`
     pub ut_line: [u8; UT_LINESIZE],