Fix: POPT_ARG_LONGLONG does not exist in popt 1.13
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 17 May 2018 19:35:17 +0000 (15:35 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 17 May 2018 20:50:37 +0000 (16:50 -0400)
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 <abenbach@ciena.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
cli/babeltrace-cfg-cli-args.c

index 8f01e64b60be196574afef220677de77a2f69db2..bd1bcc530ed07d3c4b8fc9b167dffb4158a1bcb0 100644 (file)
@@ -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 },
        };
This page took 0.026289 seconds and 4 git commands to generate.