mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
[release-0.4] nvim: Correctly setup global channels
As gcc10 uses -fno-common by default, global variables declared with the same name more than once is not allowed anymore revealing this issue. We need to define it as extern to access it. See also https://bugzilla.redhat.com/show_bug.cgi?id=1799680
This commit is contained in:
committed by
James McCoy
parent
6b38b9e4c6
commit
0493fa00fa
@ -15,7 +15,6 @@
|
||||
#include "nvim/ascii.h"
|
||||
|
||||
static bool did_stdio = false;
|
||||
PMap(uint64_t) *channels = NULL;
|
||||
|
||||
/// next free id for a job or rpc channel
|
||||
/// 1 is reserved for stdio channel
|
||||
|
@ -85,7 +85,7 @@ struct Channel {
|
||||
bool callback_scheduled;
|
||||
};
|
||||
|
||||
EXTERN PMap(uint64_t) *channels;
|
||||
EXTERN PMap(uint64_t) *channels INIT(= NULL);
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "channel.h.generated.h"
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <msgpack.h>
|
||||
|
||||
#include "nvim/ascii.h"
|
||||
#include "nvim/channel.h"
|
||||
#include "nvim/vim.h"
|
||||
#include "nvim/main.h"
|
||||
#include "nvim/aucmd.h"
|
||||
|
Reference in New Issue
Block a user