Commit cb35e033 authored by Arne Øslebø's avatar Arne Øslebø
Browse files

fix for newer gcc compilers

git-svn-id: file:///home/svn/mapi/trunk@334 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent 6203701d
......@@ -50,7 +50,7 @@ static int bpf_init(mapidflib_function_instance_t *instance,
instance->internal_data = malloc(sizeof(struct bpf_filter));
if(pcap_compile(pcap, &(/*(struct bpf_program)*/((struct bpf_filter *)instance->internal_data)->compiled), str, 1, 0)) {
if(pcap_compile(pcap, ((struct bpf_program*)&((struct bpf_filter *)instance->internal_data)->compiled), str, 1, 0)) {
fprintf(stderr, "bpf compilation error: %s\nstr: \"%s\"\n",
return PCAP_BPF_ERR;
......@@ -71,7 +71,7 @@ static int bpf_process(mapidflib_function_instance_t *instance,
static int bpf_cleanup(mapidflib_function_instance_t *instance) {
if(instance->internal_data != NULL){
pcap_freecode(&/*(struct bpf_program)*/((struct bpf_filter *)instance->internal_data)->compiled);
pcap_freecode((struct bpf_program *)&((struct bpf_filter *)instance->internal_data)->compiled);
return 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment