summaryrefslogtreecommitdiffstats
path: root/iptables/xtables-translate.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-translate.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-translate.c')
-rw-r--r--iptables/xtables-translate.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/iptables/xtables-translate.c b/iptables/xtables-translate.c
index eb35890a..4ae9ff57 100644
--- a/iptables/xtables-translate.c
+++ b/iptables/xtables-translate.c
@@ -6,7 +6,7 @@
* by the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
-
+#include "config.h"
#include <time.h>
#include "xtables-multi.h"
#include "nft.h"
@@ -510,20 +510,20 @@ static int xtables_restore_xlate_main(int family, const char *progname,
while ((c = getopt_long(argc, argv, "hf:V", options, NULL)) != -1) {
switch (c) {
case 'h':
- print_usage(argv[0], IPTABLES_VERSION);
+ print_usage(argv[0], PACKAGE_VERSION);
exit(0);
case 'f':
file = optarg;
break;
case 'V':
- printf("%s v%s\n", argv[0], IPTABLES_VERSION);
+ printf("%s v%s\n", argv[0], PACKAGE_VERSION);
exit(0);
}
}
if (file == NULL) {
fprintf(stderr, "ERROR: missing file name\n");
- print_usage(argv[0], IPTABLES_VERSION);
+ print_usage(argv[0], PACKAGE_VERSION);
exit(0);
}
@@ -534,7 +534,7 @@ static int xtables_restore_xlate_main(int family, const char *progname,
}
printf("# Translated by %s v%s on %s",
- argv[0], IPTABLES_VERSION, ctime(&now));
+ argv[0], PACKAGE_VERSION, ctime(&now));
xtables_restore_parse(&h, &p, &cb_xlate, argc, argv);
printf("# Completed on %s", ctime(&now));