Blame SOURCES/0009-arptables-remove-dead-dynamic-hooks-code.patch

0890d3
From 27791d35cf3fd7e7ca1389804b6e1820fa70bc0f Mon Sep 17 00:00:00 2001
0890d3
From: Gustavo Zacarias <gustavo@zacarias.com.ar>
0890d3
Date: Tue, 11 Nov 2014 10:20:22 -0300
0890d3
Subject: [PATCH] arptables: remove dead dynamic hooks code
0890d3
0890d3
The code is unused and #if'ed away, it also breaks pure-static
0890d3
builds because of the dlfcn.h include.
0890d3
0890d3
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
0890d3
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
0890d3
(cherry picked from commit 4b7d6b0cac33d41cb3c74694ada06e19aa7e920e)
0890d3
Signed-off-by: Phil Sutter <psutter@redhat.com>
0890d3
---
0890d3
 arptables.c              |  1 -
0890d3
 libarptc/libarptc_incl.c | 15 ---------------
0890d3
 2 files changed, 16 deletions(-)
0890d3
0890d3
diff --git a/arptables.c b/arptables.c
0890d3
index 64ac3aa226a2c..845e226a98a30 100644
0890d3
--- a/arptables.c
0890d3
+++ b/arptables.c
0890d3
@@ -35,7 +35,6 @@
0890d3
 #include <stdio.h>
0890d3
 #include <stdlib.h>
0890d3
 #include <inttypes.h>
0890d3
-#include <dlfcn.h>
0890d3
 #include <ctype.h>
0890d3
 #include <stdarg.h>
0890d3
 #include <limits.h>
0890d3
diff --git a/libarptc/libarptc_incl.c b/libarptc/libarptc_incl.c
0890d3
index 9c1aeac7ca3de..1d2e8b7b7ac01 100644
0890d3
--- a/libarptc/libarptc_incl.c
0890d3
+++ b/libarptc/libarptc_incl.c
0890d3
@@ -257,22 +257,7 @@ TC_INIT(const char *tablename)
0890d3
 	    == NULL)
0890d3
 		return NULL;
0890d3
 
0890d3
-/* Too hard --RR */
0890d3
-#if 0
0890d3
-	sprintf(pathname, "%s/%s", ARPT_LIB_DIR, info.name);
0890d3
-	dynlib = dlopen(pathname, RTLD_NOW);
0890d3
-	if (!dynlib) {
0890d3
-		errno = ENOENT;
0890d3
-		return NULL;
0890d3
-	}
0890d3
-	h->hooknames = dlsym(dynlib, "hooknames");
0890d3
-	if (!h->hooknames) {
0890d3
-		errno = ENOENT;
0890d3
-		return NULL;
0890d3
-	}
0890d3
-#else
0890d3
 	h->hooknames = hooknames;
0890d3
-#endif
0890d3
 
0890d3
 	/* Initialize current state */
0890d3
 	h->info = info;
0890d3
-- 
0890d3
2.21.0
0890d3