Permalink
Browse files

Fix Linux compat.

  • Loading branch information...
1 parent e3e6909 commit f588f61fbd92c1bdaed783a4280c1822697b673c @jedisct1 committed Jun 20, 2011
Showing with 5 additions and 3 deletions.
  1. +1 −1 INSTALL
  2. +2 −1 src/hook-recvfrom.c
  3. +2 −1 src/hook-sendto.c
View
@@ -1,7 +1,7 @@
6Jack's only dependency is MessagePack: http://msgpack.org/
-It has been tested on OSX and OpenBSD.
+It has been tested on OSX, OpenBSD and Linux.
OpenBSD requires support for posix_spawn():
http://download.pureftpd.org/misc/OpenBSD/patches/posix_spawn.diff
View
@@ -65,7 +65,8 @@ static FilterReplyResult filter_apply(FilterReplyResultBase * const rb,
{
msgpack_packer * const msgpack_packer = rb->filter->msgpack_packer;
filter_before_apply(rb, 2U, "recvfrom",
- sa_local, sa_local_len, sa_remote, *sa_remote_len);
+ sa_local, sa_local_len, sa_remote,
+ sa_remote_len ? *sa_remote_len : 0U);
msgpack_pack_mstring(msgpack_packer, "flags");
msgpack_pack_int(msgpack_packer, *flags);
View
@@ -58,7 +58,8 @@ static FilterReplyResult filter_apply(FilterReplyResultBase * const rb,
{
msgpack_packer * const msgpack_packer = rb->filter->msgpack_packer;
filter_before_apply(rb, 2U, "sendto",
- sa_local, sa_local_len, sa_remote, *sa_remote_len);
+ sa_local, sa_local_len, sa_remote,
+ sa_remote_len ? *sa_remote_len : 0U);
msgpack_pack_mstring(msgpack_packer, "flags");
msgpack_pack_int(msgpack_packer, *flags);
msgpack_pack_mstring(msgpack_packer, "data");

0 comments on commit f588f61

Please sign in to comment.