Per Guy Harris email@example.com:
In your FreeBSD Valgrind port, include/vki/vki-freebsd.h has copies of the system data structures used by various system calls and ioctls.
The Darwin port just includes the header files, and defines various vki_ and VKI_ values in terms of the underlying OS value.
I recently submitted a patch to fix up the ioctl handling on Darwin to handle BPF ioctls - somebody'd complained about Valgrind warnings on FreeBSD from a libpcap-based program, most of which looked as if they were probably just the result of Valgrind not knowing what the ioctls did, and I figured a fix for Darwin would probably not be too hard to tweak for FreeBSD.
For Darwin, I just had to add an include of <net/bpf.h> and a few additional #defines to include/vki/vki-freebsd.h. I'd have to drag in a bunch of structure definitions as well for FreeBSD.
Is there any reason (other than "that's how they did it for Linux", which may be just a case of "well, that's just how Linux is") to copy the structure definitions into include/vki/vki-freebsd.h?