Gentoo Archives: gentoo-commits

From: "Jeroen Roovers (jer)" <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-analyzer/ethloop/files: ethloop-10-gcc44.patch
Date: Wed, 01 Dec 2010 01:03:52
Message-Id: 20101201010337.97D6F20057@flycatcher.gentoo.org
1 jer 10/12/01 01:03:37
2
3 Added: ethloop-10-gcc44.patch
4 Log:
5 Fix recv call (bug #336755), add some more includes. Use make command line variables instead of patching Makefile. Remove empty DEPEND.
6
7 (Portage version: 2.2.0_alpha6/cvs/Linux i686)
8
9 Revision Changes Path
10 1.1 net-analyzer/ethloop/files/ethloop-10-gcc44.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/ethloop/files/ethloop-10-gcc44.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/ethloop/files/ethloop-10-gcc44.patch?rev=1.1&content-type=text/plain
14
15 Index: ethloop-10-gcc44.patch
16 ===================================================================
17 Fix recv call (bug #336755), add some more includes
18
19 --- a/ethloop.c 2002-05-03 15:13:20.000000000 +0200
20 +++ b/ethloop.c 2010-12-01 01:51:58.000000000 +0100
21 @@ -1,5 +1,7 @@
22 /* vim: cin sw=4 ts=4
23 */
24 +#include <arpa/inet.h> /* htons() */
25 +#include <sys/types.h> /* recv() */
26 #include <sys/socket.h>
27 #include <sys/ioctl.h>
28 #include <sys/poll.h>
29 @@ -13,6 +15,7 @@
30 #include <stdlib.h>
31 #include <sys/time.h>
32 #include <signal.h>
33 +#include <string.h>
34
35 int sock;
36
37 @@ -133,7 +136,7 @@
38 int recv_raw(int tmo)
39 {
40 struct pollfd pf = {sock,POLLIN,0};
41 - int r; unsigned short proto;
42 + ssize_t r; unsigned short proto;
43 if(poll(&pf,1,tmo) <= 0) return 0;
44 r = recv(sock,&buf,1550,0);
45 if (r <= 0) {