Skip to content

Commit

Permalink
mausezahn: move variable definitions from mops.h to mops.c
Browse files Browse the repository at this point in the history
Move variable definitions to avoid "multiple definition of symbol"
linker errors with gcc-10.

Updates #216

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  • Loading branch information
tklauser committed Aug 19, 2020
1 parent 0d5aa32 commit 3178ceb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion staging/mops.c
Expand Up @@ -46,8 +46,11 @@
#include "mz.h"
#include "mops.h"

unsigned int min_frame_s;
unsigned int max_frame_s;


struct automops * amp_head;
struct mops *mp_head; // This global will point to the head of the mops list

// Creates first element, aka "head" element
// This element can also be used! See mops_alloc_packet!
Expand Down
8 changes: 4 additions & 4 deletions staging/mops.h
Expand Up @@ -114,8 +114,8 @@
// These are initialized with the definitions MIN_MOPS_FRAME_SIZE and
// MAX_MOPS_FRAME_SIZE above but can be overridden by the user (without
// extending these limits)
unsigned int min_frame_s;
unsigned int max_frame_s;
extern unsigned int min_frame_s;
extern unsigned int max_frame_s;

struct mops_counter
{
Expand Down Expand Up @@ -246,7 +246,7 @@ struct automops {
};


struct automops * amp_head;
extern struct automops * amp_head;


struct mops
Expand Down Expand Up @@ -688,7 +688,7 @@ struct mops_ext_syslog //TODO

/////////////////////////////////////////////////////////////////

struct mops *mp_head; // This global will point to the head of the mops list
extern struct mops *mp_head; // This global will point to the head of the mops list

/////////////////////////////////////////////////////////////////
// MOPS Prototypes:
Expand Down

0 comments on commit 3178ceb

Please sign in to comment.