summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2020-01-02 07:46:23 -0500
committerAmar Tumballi <amarts@gmail.com>2020-01-06 07:47:49 +0000
commitf66bd85af09397300ad434655fc68861f48c2e3c (patch)
treed097075b3a21fe99c15a9b485fac2f827bf6bdb5 /cli
parent063bfe949eb11b33424bd67dd4225bb430ceaae7 (diff)
cli: duplicate defns of cli_default_conn_timeout and cli_ten_minutes_timeout
Winter is coming. So is gcc-10. Compiling with gcc-10-20191219 snapshot reveals dupe defns of cli_default_conn_timeout and cli_ten_minutes_timeout in .../cli/src/cli.[ch] due to missing extern decl. There are many changes coming in gcc-10 described in https://gcc.gnu.org/gcc-10/changes.html compiling cli.c with gcc-9 we see: ... .quad .LC88 .comm cli_ten_minutes_timeout,4,4 .comm cli_default_conn_timeout,4,4 .text .Letext0: ... and with gcc-10: ... .quad .LC88 .globl cli_ten_minutes_timeout .bss .align 4 .type cli_ten_minutes_timeout, @object .size cli_ten_minutes_timeout, 4 cli_ten_minutes_timeout: .zero 4 .globl cli_default_conn_timeout .align 4 .type cli_default_conn_timeout, @object .size cli_default_conn_timeout, 4 cli_default_conn_timeout: .zero 4 .text .Letext0: ... which is reflected in the .o file as (gcc-9): ... 0000000000000004 C cli_ten_minutes_timeout 0000000000000004 C cli_default_conn_timeout ... and (gcc-10): ... 0000000000000020 B cli_ten_minutes_timeout 0000000000000024 B cli_default_conn_timeout ... See nm(1) and ld(1) for a description C (common) and B (BSS) and how they are treated by the linker. Note: there is still a small chance that gcc-10 will land in Fedora-32, despite 31 Dec. 2019 having been the deadline for that to happen. Change-Id: I54ea485736a4910254eeb21222ad263721cdef3c Fixes: bz#1193929 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli.c3
-rw-r--r--cli/src/cli.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/cli/src/cli.c b/cli/src/cli.c
index cb425c84bdc..2c96b7ae6e6 100644
--- a/cli/src/cli.c
+++ b/cli/src/cli.c
@@ -84,6 +84,9 @@ rpc_clnt_prog_t *cli_rpc_prog;
extern struct rpc_clnt_program cli_prog;
+int cli_default_conn_timeout = 120;
+int cli_ten_minutes_timeout = 600;
+
static int
glusterfs_ctx_defaults_init(glusterfs_ctx_t *ctx)
{
diff --git a/cli/src/cli.h b/cli/src/cli.h
index 81f75a0b416..cd4db3dac2c 100644
--- a/cli/src/cli.h
+++ b/cli/src/cli.h
@@ -40,8 +40,8 @@ enum argp_option_keys {
ARGP_PORT_KEY = 'p',
};
-int cli_default_conn_timeout;
-int cli_ten_minutes_timeout;
+extern int cli_default_conn_timeout;
+extern int cli_ten_minutes_timeout;
typedef enum {
COLD_BRICK_COUNT,