--- AnyEvent-Fork-RPC/RPC.pm 2013/04/22 20:05:03 1.23 +++ AnyEvent-Fork-RPC/RPC.pm 2013/04/27 23:49:01 1.24 @@ -528,7 +528,7 @@ if ($len) { while (8 <= length $rbuf) { - ($id, $len) = unpack "LL", $rbuf; + ($id, $len) = unpack "NN", $rbuf; 8 + $len <= length $rbuf or last; @@ -583,7 +583,7 @@ $guard if 0; # keep it alive - $wbuf .= pack "LL/a*", $id, &$f; + $wbuf .= pack "NN/a*", $id, &$f; $ww ||= $fh && AE::io $fh, 1, $wcb; } : sub { @@ -591,7 +591,7 @@ $guard; # keep it alive - $wbuf .= pack "L/a*", &$f; + $wbuf .= pack "N/a*", &$f; $ww ||= $fh && AE::io $fh, 1, $wcb; } }