summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2024-11-07 17:02:20 +0100
committerPhil Sutter <phil@nwl.cc>2024-11-07 17:41:04 +0100
commitb15981e6ff2138b45bce3867454ae084790cbf43 (patch)
tree1ec2ccbbe5feb17370e934ed68e7aa368ded6168
parenta740ba811a70c318aee0410d42e4fa74e104c440 (diff)
libxtables: Hide xtables_strtoul_base() symbol
There are no external users, no need to promote it in xtables.h. Fixes: 1af6984c57cce ("libxtables: Introduce xtables_strtoul_base()") Signed-off-by: Phil Sutter <phil@nwl.cc> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--include/Makefile.am2
-rw-r--r--include/xtables.h2
-rw-r--r--include/xtables_internal.h7
-rw-r--r--libxtables/xtables.c1
-rw-r--r--libxtables/xtoptions.c1
5 files changed, 10 insertions, 3 deletions
diff --git a/include/Makefile.am b/include/Makefile.am
index 07c88b90..f3e480f7 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -11,7 +11,7 @@ nobase_include_HEADERS = \
libiptc/ipt_kernel_headers.h libiptc/libiptc.h \
libiptc/libip6tc.h libiptc/libxtc.h libiptc/xtcshared.h
-EXTRA_DIST = iptables linux iptables.h ip6tables.h
+EXTRA_DIST = iptables linux iptables.h ip6tables.h xtables_internal.h
uninstall-hook:
dir=${includedir}/libiptc; { \
diff --git a/include/xtables.h b/include/xtables.h
index ab856ebc..9fdd8291 100644
--- a/include/xtables.h
+++ b/include/xtables.h
@@ -491,8 +491,6 @@ extern void xtables_register_matches(struct xtables_match *, unsigned int);
extern void xtables_register_target(struct xtables_target *me);
extern void xtables_register_targets(struct xtables_target *, unsigned int);
-extern bool xtables_strtoul_base(const char *, char **, uintmax_t *,
- uintmax_t, uintmax_t, unsigned int);
extern bool xtables_strtoul(const char *, char **, uintmax_t *,
uintmax_t, uintmax_t);
extern bool xtables_strtoui(const char *, char **, unsigned int *,
diff --git a/include/xtables_internal.h b/include/xtables_internal.h
new file mode 100644
index 00000000..a87a40cc
--- /dev/null
+++ b/include/xtables_internal.h
@@ -0,0 +1,7 @@
+#ifndef XTABLES_INTERNAL_H
+#define XTABLES_INTERNAL_H 1
+
+extern bool xtables_strtoul_base(const char *, char **, uintmax_t *,
+ uintmax_t, uintmax_t, unsigned int);
+
+#endif /* XTABLES_INTERNAL_H */
diff --git a/libxtables/xtables.c b/libxtables/xtables.c
index 7d54540b..5fc50a63 100644
--- a/libxtables/xtables.c
+++ b/libxtables/xtables.c
@@ -64,6 +64,7 @@
#endif
#include <getopt.h>
#include "iptables/internal.h"
+#include "xtables_internal.h"
#define NPROTO 255
diff --git a/libxtables/xtoptions.c b/libxtables/xtoptions.c
index 774d0ee6..64d6599a 100644
--- a/libxtables/xtoptions.c
+++ b/libxtables/xtoptions.c
@@ -21,6 +21,7 @@
#include <arpa/inet.h>
#include <netinet/ip.h>
#include "xtables.h"
+#include "xtables_internal.h"
#ifndef IPTOS_NORMALSVC
# define IPTOS_NORMALSVC 0
#endif