From 093cec72e7f7793d55fa1547cadb6655104feb5e Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 28 May 2019 11:43:26 +0200 Subject: 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 Signed-off-by: Florian Westphal --- iptables/xtables-translate.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'iptables/xtables-translate.c') 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 #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)); -- cgit v1.2.3