summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2020-08-19 12:04:47 +0200
committerTobias Klauser <tobias.klauser@gmail.com>2020-08-19 13:16:51 +0200
commit0d5aa3246c20dad2d76165559fb575136b7216e8 (patch)
treec2795e739e5cc9969e3896200db7fe036921a917
parentbfa3c89317869ffe1e90b7e01e7cacad7a7ea10e (diff)
mausezahn: move variable definitions cli.h to cli.c
Move variable definitions to avoid "multiple definition of symbol" linker errors with gcc-10. Updates #216 Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r--staging/cli.c13
-rw-r--r--staging/cli.h20
2 files changed, 23 insertions, 10 deletions
diff --git a/staging/cli.c b/staging/cli.c
index 5b5a159..dbfdb55 100644
--- a/staging/cli.c
+++ b/staging/cli.c
@@ -23,6 +23,19 @@
#include "mops.h"
#include "llist.h"
+struct cli_def *gcli;
+
+char mz_username[32];
+char mz_password[32];
+char mz_enable[32];
+char mz_listen_addr[16];
+int mz_port;
+struct mops *clipkt; // actual packet used by CLI thread
+
+int clidev;
+
+int cli_debug;
+
void mz_cli_init(void)
{
amp_head = automops_init();
diff --git a/staging/cli.h b/staging/cli.h
index 1a0156f..2ec153a 100644
--- a/staging/cli.h
+++ b/staging/cli.h
@@ -54,19 +54,19 @@
#define MZ_DEFAULT_ENABLE_PASSWORD "mops"
#define MZ_DEFAULT_PORT 25542 // Towel day and 42
-struct cli_def *gcli;
-
-char mz_username[32];
-char mz_password[32];
-char mz_enable[32];
-char mz_listen_addr[16];
-int mz_port;
-struct mops *clipkt; // actual packet used by CLI thread
+extern struct cli_def *gcli;
+
+extern char mz_username[32];
+extern char mz_password[32];
+extern char mz_enable[32];
+extern char mz_listen_addr[16];
+extern int mz_port;
+extern struct mops *clipkt; // actual packet used by CLI thread
-int clidev;
+extern int clidev;
// =================================================================
-int cli_debug;
+extern int cli_debug;
// Flags from 0x0000 to 0xFFFF
// cli_debug & 8000 => Developer specific debugs