Open
Description
Target Triple: aarch64-apple-darwin
Hi, I was able to use the SIOCGIFFLAGS ioctl (with the libc::ifreq struct) just fine on Linux, but on Mac, I hit an issue due to the SIOCGIFFLAGS constant not being defined. It looks like all of the ioctl constants from sys/sockio.h are missing.
For now I was able to use this workaround:
#[cfg(any(target_os = "ios", target_os = "macos"))]
const SIOCGIFFLAGS: libc::c_ulong = 0xc0206911; // extracted from macos headers via printing it in a C program
#[cfg(not(any(target_os = "ios", target_os = "macos")))]
const SIOCGIFFLAGS: libc::c_ulong = libc::SIOCGIFFLAGS;