From d891e9e5bc309d5aeb2ab774c76b34a92085b3e7 Mon Sep 17 00:00:00 2001 From: Bart De Schuymer Date: Sat, 1 Jun 2002 19:23:47 +0000 Subject: Initial revision --- .../incremental-patches/ebtables-v2.0pre2.001.diff | 121 +++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 userspace/patches/incremental-patches/ebtables-v2.0pre2.001.diff (limited to 'userspace/patches/incremental-patches/ebtables-v2.0pre2.001.diff') diff --git a/userspace/patches/incremental-patches/ebtables-v2.0pre2.001.diff b/userspace/patches/incremental-patches/ebtables-v2.0pre2.001.diff new file mode 100644 index 0000000..80cc94b --- /dev/null +++ b/userspace/patches/incremental-patches/ebtables-v2.0pre2.001.diff @@ -0,0 +1,121 @@ +Changed the Makefile hacking to initialize things (taken from iptables) +to using __attribute__ ((constructor)). Makes things cleaner. + +--- ebtables-v2.0pre1/Makefile Wed Apr 3 18:24:15 2002 ++++ ebtables-v2.0pre2/Makefile Sat Apr 6 21:53:00 2002 +@@ -26,7 +26,7 @@ + $(CC) $(CFLAGS) -DPROGVERSION=\"$(PROGVERSION)\" \ + -DPROGNAME=\"$(PROGNAME)\" -c -o $@ $< + +-ebtables: ebtables.o communication.o initext.o $(EXT_OBJS) ++ebtables: ebtables.o communication.o $(EXT_OBJS) + $(CC) $(CFLAGS) -o $@ $^ + + $(MANDIR)/man8/ebtables.8: ebtables.8 +--- ebtables-v2.0pre1/ebtables.c Wed Apr 3 20:06:18 2002 ++++ ebtables-v2.0pre2/ebtables.c Sat Apr 6 21:57:05 2002 +@@ -1051,7 +1051,6 @@ + replace.selected_hook = -1; + replace.command = 'h'; + // execute the _init functions of the extensions +- init_extensions(); + + new_entry = (struct ebt_u_entry *)malloc(sizeof(struct ebt_u_entry)); + if (!new_entry) +--- ebtables-v2.0pre1/extensions/ebt_nat.c Wed Apr 3 12:27:59 2002 ++++ ebtables-v2.0pre2/extensions/ebt_nat.c Sat Apr 6 21:59:43 2002 +@@ -160,7 +160,8 @@ + opts_d, + }; + +-void _init(void) ++static void _init(void) __attribute__ ((constructor)); ++static void _init(void) + { + register_target(&snat_target); + register_target(&dnat_target); +--- ebtables-v2.0pre1/extensions/ebt_ip.c Wed Apr 3 12:28:44 2002 ++++ ebtables-v2.0pre2/extensions/ebt_ip.c Sat Apr 6 21:58:23 2002 +@@ -301,7 +301,8 @@ + opts, + }; + +-void _init(void) ++static void _init(void) __attribute((constructor)); ++static void _init(void) + { + register_match(&ip_match); + } +--- ebtables-v2.0pre1/extensions/ebt_arp.c Wed Apr 3 12:29:17 2002 ++++ ebtables-v2.0pre2/extensions/ebt_arp.c Sat Apr 6 21:58:05 2002 +@@ -271,7 +271,8 @@ + opts, + }; + +-void _init(void) ++static void _init(void) __attribute__ ((constructor)); ++static void _init(void) + { + register_match(&arp_match); + } +--- ebtables-v2.0pre1/extensions/ebt_log.c Wed Apr 3 16:23:56 2002 ++++ ebtables-v2.0pre2/extensions/ebt_log.c Sat Apr 6 21:59:34 2002 +@@ -182,7 +182,9 @@ + opts, + }; + +-void _init(void) ++#undef _init ++static void _init(void) __attribute__ ((constructor)); ++static void _init(void) + { + register_watcher(&log_watcher); + } +--- ebtables-v2.0pre1/extensions/ebt_standard.c Mon Apr 1 12:49:59 2002 ++++ ebtables-v2.0pre2/extensions/ebt_standard.c Sat Apr 6 22:01:29 2002 +@@ -59,7 +59,8 @@ + opts + }; + +-void _init(void) ++static void _init(void) __attribute__ ((constructor)); ++static void _init(void) + { + register_target(&standard); + } +--- ebtables-v2.0pre1/extensions/ebtable_filter.c Mon Apr 1 21:25:57 2002 ++++ ebtables-v2.0pre2/extensions/ebtable_filter.c Sat Apr 6 22:00:02 2002 +@@ -24,7 +24,8 @@ + NULL + }; + +-void _init(void) ++static void _init(void) __attribute__ ((constructor)); ++static void _init(void) + { + register_table(&table); + } +--- ebtables-v2.0pre1/extensions/ebtable_nat.c Wed Apr 3 10:16:46 2002 ++++ ebtables-v2.0pre2/extensions/ebtable_nat.c Sat Apr 6 21:59:53 2002 +@@ -24,7 +24,8 @@ + NULL + }; + +-void _init(void) ++static void _init(void) __attribute__ ((constructor)); ++static void _init(void) + { + register_table(&table); + } +--- ebtables-v2.0pre1/include/ebtables_u.h Wed Apr 3 17:20:17 2002 ++++ ebtables-v2.0pre2/include/ebtables_u.h Sat Apr 6 21:56:16 2002 +@@ -25,9 +25,6 @@ + #define EBTABLES_U_H + #include + #include +-#ifdef _INIT +-#define _init _INIT +-#endif + + struct ebt_u_entries + { -- cgit v1.2.3