As discussed on IRC, it would be nice to support ioctl calls on MacOS. I have successfully enabled/disabled the PF firewall and queried it for status using this change.
I have not tested it very extensively at all beyond what I just wrote. Maybe you could test that I didn't break it on Linux if you suspect that (I have verified that it builds at least.)
The cfg addition to pub use platform::*; was needed in order for the error message to actually contain this_platform_not_supported. Otherwise it just printed:
7 | pub use platform::*;
| ^^^^^^^^^^^^ Maybe a missing `extern crate platform;`?
As discussed on IRC, it would be nice to support ioctl calls on MacOS. I have successfully enabled/disabled the PF firewall and queried it for status using this change.
I have not tested it very extensively at all beyond what I just wrote. Maybe you could test that I didn't break it on Linux if you suspect that (I have verified that it builds at least.)
The
cfg
addition topub use platform::*;
was needed in order for the error message to actually containthis_platform_not_supported
. Otherwise it just printed: