From: Scott Andrew Baillie <sbaillie@bigpond.net.au>
To: netfilter List <netfilter-devel@lists.netfilter.org>
Subject: ip_tables.h does not compile when using g++
Date: 14 Sep 2002 12:07:22 +0000 [thread overview]
Message-ID: <1032005243.9337.19.camel@localhost.localdomain> (raw)
[-- Attachment #1: Type: text/plain, Size: 897 bytes --]
Hi,
I noticed a discussion on this list in May regarding this problem
but nobody seemed to care.
The file linux-2.4.19/include/linux/netfilter_ipv4/ip_tables.h is
included by user space programs as well as the kernel, hence I think
that it should compile using g++.
This patch makes it compile. Patch is also attached.
diff -ur linux-2.4.19/include/linux/netfilter_ipv4/ip_tables.h
linux-2.4.19-new/include/linux/netfilter_ipv4/ip_tables.h
--- linux-2.4.19/include/linux/netfilter_ipv4/ip_tables.h Mon Feb 25
19:38:13 2002
+++ linux-2.4.19-new/include/linux/netfilter_ipv4/ip_tables.h Sat Sep 14
11:11:01 2002
@@ -292,7 +292,7 @@
static __inline__ struct ipt_entry_target *
ipt_get_target(struct ipt_entry *e)
{
- return (void *)e + e->target_offset;
+ return ((struct ipt_entry_target *)((char *)e + e->target_offset));
}
/* fn returns 0 to continue iteration */
Regards,
Scott.
[-- Attachment #2: linux-2.4.19-new.patch --]
[-- Type: text/x-patch, Size: 564 bytes --]
diff -ur linux-2.4.19/include/linux/netfilter_ipv4/ip_tables.h linux-2.4.19-new/include/linux/netfilter_ipv4/ip_tables.h
--- linux-2.4.19/include/linux/netfilter_ipv4/ip_tables.h Mon Feb 25 19:38:13 2002
+++ linux-2.4.19-new/include/linux/netfilter_ipv4/ip_tables.h Sat Sep 14 11:11:01 2002
@@ -292,7 +292,7 @@
static __inline__ struct ipt_entry_target *
ipt_get_target(struct ipt_entry *e)
{
- return (void *)e + e->target_offset;
+ return ((struct ipt_entry_target *)((char *)e + e->target_offset));
}
/* fn returns 0 to continue iteration */
next reply other threads:[~2002-09-14 12:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-14 12:07 Scott Andrew Baillie [this message]
2002-09-15 11:20 ` ip_tables.h does not compile when using g++ Harald Welte
-- strict thread matches above, loose matches on Subject: below --
2002-09-16 14:12 Scott Andrew Baillie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1032005243.9337.19.camel@localhost.localdomain \
--to=sbaillie@bigpond.net.au \
--cc=netfilter-devel@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.