GCC problem
- From: westymatt <westymatt@xxxxxxxxx>
- Date: Wed, 18 Jul 2007 07:19:17 -0000
I switched my code over to using what I believe to be the K&R style
function definitions.
63 /*pcap_loop callback routine*/
64 void
65 capture_callback(buffer, packet_header, data)
66 u_char *buffer, const struct pcap_pkthdr
*packet_header, u_char *data;
67 {
68 total_captured_packets++;
69 if (display == true)
70 {
71 fprintf(stdout, "Received packet %d\n");
72 }
73 if (cache_packets == true)
74 {
75 struct packetCache *pc;
76 if ((pc = malloc(sizeof *pc + packet_header->len)) ==
NULL)
77 {
78 fprintf(stderr, "Memory Allocation Error!\n");
79 fprintf(stderr, "Turning off caching\n");
80 cache_packets = false;
"packman.c" 230L, 5444C written
sysadmin@devbox:~/projects/packet_capture$ gcc -c packman.c
packman.c: In function âcapture_callbackâ:
packman.c:66: error: expected identifier or â(â before âconstâ
packman.c:76: error: invalid type argument of â->â
.
- Follow-Ups:
- Re: GCC problem
- From: Gil Hamilton
- Re: GCC problem
- From: Mike McGInn
- Re: GCC problem
- From: Ulrich Eckhardt
- Re: GCC problem
- Prev by Date: Re: GCC problem
- Next by Date: Re: My program can't work on redhat enterprise AS 4
- Previous by thread: to make soft interrupt with AX registers in linux?
- Next by thread: Re: GCC problem
- Index(es):