Closed kpcyrd closed 7 years ago
I've compiled the lib on another system which is x86_64 without any problems, so I assume this is system specific. The error happened on a raspberry pi 1 with archlinux arm.
Interesting. Can you try std::os::raw::c_char
instead of i8
? My first guess is an OS-specific difference in char
.
Interesting, this compiles on both my x86_64 and armv6l system:
diff --git a/src/tap/tap.rs b/src/tap/tap.rs
index 05f9ff3..cf95add 100644
--- a/src/tap/tap.rs
+++ b/src/tap/tap.rs
@@ -103,7 +103,7 @@ impl Tap {
let mut iface: bpf::ifreq = unsafe { mem::zeroed() };
for (i, c) in interface.bytes().enumerate() {
- iface.ifr_name[i] = c as i8;
+ iface.ifr_name[i] = c as std::os::raw::c_char;
}
// Set the buffer length
I'm going to use the patched library for now, an update would be appreciated so I can drop my local version later :) Thanks!
I'm having trouble compiling this:
This is rust 1.19, could you have a look into this?