All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Oester <kernel@linuxace.com>
To: netfilter-devel@lists.netfilter.org
Subject: [PATCH] RFC - compile iptables without O2
Date: Wed, 8 Sep 2004 15:34:00 -0700	[thread overview]
Message-ID: <20040908223400.GA16692@linuxace.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 358 bytes --]

There is an ancient bug in bugzilla (#13) which says iptables should 
compile without 'O2'.  Not sure why this is important, but the below
patch makes it compile, and the resulting executable works.

Anyone comment on why these '#ifndef __OPTIMIZE' statements were added
in the first place, and whether I'm missing something by simply removing
them?

Phil



[-- Attachment #2: patch-nooptimize --]
[-- Type: text/plain, Size: 1398 bytes --]

diff -ru ipt-orig/ip6tables.c ipt-new/ip6tables.c
--- ipt-orig/ip6tables.c	2004-06-14 18:02:16.000000000 -0400
+++ ipt-new/ip6tables.c	2004-09-08 18:14:53.031881136 -0400
@@ -148,14 +148,6 @@
  * magic number of -1 */
 int line = -1;
 
-#ifndef __OPTIMIZE__
-struct ip6t_entry_target *
-ip6t_get_target(struct ip6t_entry *e)
-{
-	return (void *)e + e->target_offset;
-}
-#endif
-
 static struct option *opts = original_opts;
 static unsigned int global_option_offset = 0;
 
diff -ru ipt-orig/iptables.c ipt-new/iptables.c
--- ipt-orig/iptables.c	2004-06-14 18:02:16.000000000 -0400
+++ ipt-new/iptables.c	2004-09-08 18:14:23.430381248 -0400
@@ -147,14 +147,6 @@
  * magic number of -1 */
 int line = -1;
 
-#ifndef __OPTIMIZE__
-struct ipt_entry_target *
-ipt_get_target(struct ipt_entry *e)
-{
-	return (void *)e + e->target_offset;
-}
-#endif
-
 static struct option *opts = original_opts;
 static unsigned int global_option_offset = 0;
 
diff -ru ipt-orig/libiptc/libiptc.c ipt-new/libiptc/libiptc.c
--- ipt-orig/libiptc/libiptc.c	2004-06-14 18:02:18.000000000 -0400
+++ ipt-new/libiptc/libiptc.c	2004-09-08 18:19:36.847734568 -0400
@@ -27,14 +27,6 @@
 #define IPT_LIB_DIR "/usr/local/lib/iptables"
 #endif
 
-#ifndef __OPTIMIZE__
-STRUCT_ENTRY_TARGET *
-GET_TARGET(STRUCT_ENTRY *e)
-{
-	return (void *)e + e->target_offset;
-}
-#endif
-
 static int sockfd = -1;
 static void *iptc_fn = NULL;
 

                 reply	other threads:[~2004-09-08 22:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20040908223400.GA16692@linuxace.com \
    --to=kernel@linuxace.com \
    --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.