[tor-dev] torsocks-v2.0.0-rc3 NetBSD improvements

Yawning Angel yawning at schwanenlied.me
Tue Nov 5 21:02:25 UTC 2013


On Tue, 5 Nov 2013 14:25:25 -0500
David Goulet <dgoulet at ev0ke.net> wrote:

> I encountered that on FreeBSD but I can't really make it go
> away :S ... mmap() returns a void * but syscall() returns an int on
> BSD but even with a cast it prints the warning... I have *no* idea
> how *BSD systems handle syscall(SYS_MMAP, ...) for instance on an x64
> system when syscall() returns an int (8 bytes vs 4 bytes).

They don't, because people should be using __syscall for mmap on those
systems.

Quoting the relevant parts from the documentation:

  off_t
  __syscall(quad_t number, ...);

  The __syscall() form should be used when one or more of
  the arguments is a 64-bit argument to ensure that argument
  alignment is correct.

Regards,

-- 
Yawning Angel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.torproject.org/pipermail/tor-dev/attachments/20131105/8955c89f/attachment.sig>


More information about the tor-dev mailing list