I ended up doing my own struct definition without the union (I only care 
about the pointer variant) so I could go along with what Ian suggested 
above:

> It would be OK to pass a pointer to a struct to ioctl if the 
struct contains a pointer to other Go memory, but the struct field must 
have pointer type. 

https://github.com/WireGuard/wgctrl-go/pull/54

Seems to work fine, and no more Cgo!

On Friday, May 17, 2019 at 1:22:36 PM UTC-4, Jan Mercl wrote:
>
>
>
> On Fri, May 17, 2019, 19:09 Matt Layher <mdla...@gmail.com <javascript:>> 
> wrote:
>
>> Thanks for the insight, this is very useful information. Perhaps I'll 
>> look into the mmap route.
>>
>
> Possibly useful: https://godoc.org/modernc.org/memory 
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/c5de35a1-593f-4893-a92e-59178caa7d8f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to