Commit b16dc03
authored
journald: fix memfd_create_syscall for 32 bit targets (#1982)
On 32 bit targets (e.g. armv7) the syscall in memfd_create_syscall()
returns an i32, so this compilation error is printed:
| error[E0308]: mismatched types
| --> .../tracing-journald-0.2.3/src/memfd.rs:27:9
| |
| 25 | fn memfd_create_syscall(flags: c_uint) -> i64 {
| | --- expected `i64`
| | because of return type
| 26 | unsafe {
| 27 | / syscall(
| 28 | | SYS_memfd_create,
| 29 | | "tracing-journald\0".as_ptr() as *const c_char,
| 30 | | flags,
| 31 | | )
| | |_________^ expected `i64`, found `i32`
| |
| help: you can convert an `i32` to an `i64`
| |
| 31 | ).into()
| | +++++++
|
| For more information about this error, try `rustc --explain E0308`.
| error: could not compile `tracing-journald` due to previous error
|
This commit fixes this issue.1 parent 7ea09e9 commit b16dc03
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
0 commit comments