Closed mortenlj closed 1 year ago
I don't have a ppc64 machine to test, pull requests are welcome.
Even worse, this is a plain ppc (32 bit). :slightly_smiling_face: (Should be possible to emulate with QEMU though, if anyone is inclined).
I'm a beginner in Rust, and I couldn't figure out where or how this happens, so I'm at a loss as to where I would start.
Got any pointers for me, I can see what I manage to cobble together if I have a sense of where to start ...
I have been looking more at this, and have a fair idea of how it can be done. One thing I'm wondering is which would you prefer:
cfg!
macros and slightly separate codepathsTurned out to be even simpler than I thought. :smile:
I'm trying to get the IP of all interfaces, and when running on x86_64 it works fine, but when I compile for a more esoteric target (
powerpc-unknown-linux-gnuspe
), the returned IP addresses are reversed.I imagine this is some sort of byte-ordering problem, but I'm not really sure where the problem lies.
Output from the example code in
https://github.com/messense/if-addrs/blob/master/examples/list_interfaces.rs
when executed on a Synology DS213+, which has a FREESCALE QorIQ P1022 (PowerPC) CPU: