Re: [tcpdump-workers] [Patch] print-nfs.c

2013-07-11 Thread Denis Ovsienko
10.07.2013, 15:18, Gisle Vanem gva...@broadpark.no:
 'int32_t' isn't 'int' for all targets. Some Windows targets have
 it defined as 'signed int' in win32/Include/bittypes.h. So print-nfs.c
 does not compile cleanly; conflicting definition of xid_map_find().

Should both declarations be just int then? The function returns either 0 or 
-1 and the only calling function checks the result to be = 0.

-- 
Denis Ovsienko
___
tcpdump-workers mailing list
tcpdump-workers@lists.tcpdump.org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers


Re: [tcpdump-workers] [Patch] print-nfs.c

2013-07-11 Thread Gisle Vanem

Denis Ovsienko infrastat...@yandex.ru wrote:


10.07.2013, 15:18, Gisle Vanem gva...@broadpark.no:

'int32_t' isn't 'int' for all targets. Some Windows targets have
it defined as 'signed int' in win32/Include/bittypes.h. So print-nfs.c
does not compile cleanly; conflicting definition of xid_map_find().


Should both declarations be just int then?


That could be simpler, yes.

--gv
___
tcpdump-workers mailing list
tcpdump-workers@lists.tcpdump.org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers


Re: [tcpdump-workers] [Patch] print-nfs.c

2013-07-11 Thread Denis Ovsienko
11.07.2013, 16:36, Gisle Vanem gva...@broadpark.no:
 Denis Ovsienko infrastat...@yandex.ru wrote:

  10.07.2013, 15:18, Gisle Vanem gva...@broadpark.no:
  'int32_t' isn't 'int' for all targets. Some Windows targets have
  it defined as 'signed int' in win32/Include/bittypes.h. So print-nfs.c
  does not compile cleanly; conflicting definition of xid_map_find().
  Should both declarations be just int then?

 That could be simpler, yes.

It is now in GitHub master branch, thank you!

-- 
Denis Ovsienko
___
tcpdump-workers mailing list
tcpdump-workers@lists.tcpdump.org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers


[tcpdump-workers] [Patch] print-nfs.c

2013-07-10 Thread Gisle Vanem

'int32_t' isn't 'int' for all targets. Some Windows targets have
it defined as 'signed int' in win32/Include/bittypes.h. So print-nfs.c
does not compile cleanly; conflicting definition of xid_map_find().
A fix:

--- Git-Latest/print-nfs.c  2013-07-03 09:24:42 +
+++ print-nfs.c 2013-07-04 07:39:33 +
@@ -981,7 +981,7 @@
 * Returns 0 and puts NFSPROC_xxx in proc return and
 * version in vers return, or returns -1 on failure
 */
-static int
+static int32_t
xid_map_find(const struct sunrpc_msg *rp, const u_char *bp, u_int32_t *proc,
u_int32_t *vers)
{

--gv
___
tcpdump-workers mailing list
tcpdump-workers@lists.tcpdump.org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers