From 738302b8f0b97c5dee4ffa0da975f0e8362ae48b Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 17 May 2018 15:35:17 -0400 Subject: [PATCH] Fix: POPT_ARG_LONGLONG does not exist in popt 1.13 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The retry duration parameter is currently declared as a long long, which popt 1.13 does not support. The support for that type was only added in popt 1.14. Using POPT_ARG_LONG instead of the 'long long' variant makes no real difference in this case (or at least, not enough to justify bumping the minimal popt version). This fixes a build failure that was reported on Red Hat 7 where 1.13 is the default version. Reported-by: Abderrahmane Benbachir Signed-off-by: Jérémie Galarneau --- cli/babeltrace-cfg-cli-args.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/babeltrace-cfg-cli-args.c b/cli/babeltrace-cfg-cli-args.c index 8f01e64b..bd1bcc53 100644 --- a/cli/babeltrace-cfg-cli-args.c +++ b/cli/babeltrace-cfg-cli-args.c @@ -2374,7 +2374,7 @@ struct bt_config *bt_config_run_from_args(int argc, const char *argv[], struct bt_value *connection_args = NULL; GString *cur_param_key = NULL; char error_buf[256] = { 0 }; - long long retry_duration = -1; + long retry_duration = -1; struct poptOption run_long_options[] = { { "base-params", 'b', POPT_ARG_STRING, NULL, OPT_BASE_PARAMS, NULL, NULL }, { "component", 'c', POPT_ARG_STRING, NULL, OPT_COMPONENT, NULL, NULL }, @@ -2387,7 +2387,7 @@ struct bt_config *bt_config_run_from_args(int argc, const char *argv[], { "params", 'p', POPT_ARG_STRING, NULL, OPT_PARAMS, NULL, NULL }, { "plugin-path", '\0', POPT_ARG_STRING, NULL, OPT_PLUGIN_PATH, NULL, NULL }, { "reset-base-params", 'r', POPT_ARG_NONE, NULL, OPT_RESET_BASE_PARAMS, NULL, NULL }, - { "retry-duration", '\0', POPT_ARG_LONGLONG, &retry_duration, OPT_RETRY_DURATION, NULL, NULL }, + { "retry-duration", '\0', POPT_ARG_LONG, &retry_duration, OPT_RETRY_DURATION, NULL, NULL }, { "value", '\0', POPT_ARG_STRING, NULL, OPT_VALUE, NULL, NULL }, { NULL, 0, '\0', NULL, 0, NULL, NULL }, }; -- 2.34.1