pkgsrc/security/fragroute/patches/patch-aa
cube 796b5386cc No patches are needed for that package, except for -current between Sept.,
16th 2003 and Jan., 6th 2004 when <sys/siginfo.h> included <sys/queue.h>
unconditionally.

Rework the patches so that they're used only in that case.
2004-01-15 14:10:51 +00:00

24 lines
640 B
Text

$NetBSD: patch-aa,v 1.2 2004/01/15 14:10:51 cube Exp $
--- mod.c.orig 2002-04-08 00:55:20.000000000 +0200
+++ mod.c
@@ -151,10 +151,19 @@ mod_close(void)
{
struct rule *rule;
+#if defined(FRAGROUTE_SYSTEM_SYS_QUEUE) && defined(__NetBSD__)
+ TAILQ_FOREACH_REVERSE(rule, &rules, head, next) {
+ if (rule->mod->close != NULL)
+ rule->data = rule->mod->close(rule->data);
+ TAILQ_REMOVE(&rules, rule, next);
+ free(rule);
+ }
+#else
TAILQ_FOREACH_REVERSE(rule, &rules, next, head) {
if (rule->mod->close != NULL)
rule->data = rule->mod->close(rule->data);
TAILQ_REMOVE(&rules, rule, next);
free(rule);
}
+#endif
}