summaryrefslogtreecommitdiffstats
path: root/iptables/xtables-save.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@inai.de>2019-05-28 11:43:26 +0200
committerFlorian Westphal <fw@strlen.de>2019-05-30 22:43:17 +0200
commit093cec72e7f7793d55fa1547cadb6655104feb5e (patch)
tree237bfd5ed2672fd18dc93a21dc53ddb11b29de82 /iptables/xtables-save.c
parenta84b12c69dcd57eb7df19e59b85af0fb5d98a81b (diff)
src: replace IPTABLES_VERSION by PACKAGE_VERSION
The IPTABLES_VERSION C macro replicates the PACKAGE_VERSION C macro (both have the same definition, "@PACKAGE_VERSION@"). Since IPTABLES_VERSION, being located in internal.h, is not exposed to downstream users in any way, it can just be replaced by PACKAGE_VERSION, which saves a configure-time file substitution. This goes towards eliminating unnecessary rebuilds after rerunning ./configure. Signed-off-by: Jan Engelhardt <jengelh@inai.de> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'iptables/xtables-save.c')
-rw-r--r--iptables/xtables-save.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/iptables/xtables-save.c b/iptables/xtables-save.c
index 2cc5a7c7..98e004af 100644
--- a/iptables/xtables-save.c
+++ b/iptables/xtables-save.c
@@ -6,6 +6,7 @@
* This code is distributed under the terms of GNU GPL v2
*
*/
+#include "config.h"
#include <getopt.h>
#include <errno.h>
#include <stdio.h>
@@ -80,7 +81,7 @@ __do_output(struct nft_handle *h, const char *tablename, bool counters)
time_t now = time(NULL);
printf("# Generated by xtables-save v%s on %s",
- IPTABLES_VERSION, ctime(&now));
+ PACKAGE_VERSION, ctime(&now));
printf("*%s\n", tablename);
/* Dump out chain names first,
@@ -266,7 +267,7 @@ static int __ebt_save(struct nft_handle *h, const char *tablename, bool counters
if (first) {
now = time(NULL);
printf("# Generated by ebtables-save v%s on %s",
- IPTABLES_VERSION, ctime(&now));
+ PACKAGE_VERSION, ctime(&now));
first = false;
}
printf("*%s\n", tablename);