I am trying to initialize an unsafe pointer
func f1()
{
var ifaddr : UnsafeMutablePointer<ifaddrs>?
// ....
// .... collect ifaddr value
var d1 = UnsafePointer<sockaddr_dl>(ifaddr)
}
and received the below error in the last line of code:
init
is unavailable: usewithMemoryRebound(to:capacity:_)
to temporarily view memory as another layout-compatible type.
the posted answers to a similar problem are unclear to me, can anybody help with fixing this sample code?