mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-26 21:00:30 +00:00
sys/common_linux.h: move the definition of a global nlmsg variable
This global variable cannot be used for pseudo syscalls as they can run concurrently (in threaded mode). It can only be used during initialization, and if initialization routines are not enabled, nlmsg will become an unused variable.
This commit is contained in:
parent
aff59df257
commit
56f696d1d0
@ -131,8 +131,6 @@ struct nlmsg {
|
||||
char buf[4096];
|
||||
};
|
||||
|
||||
static struct nlmsg nlmsg;
|
||||
|
||||
static void netlink_init(struct nlmsg* nlmsg, int typ, int flags,
|
||||
const void* data, int size)
|
||||
{
|
||||
@ -440,6 +438,10 @@ static void netlink_add_neigh(struct nlmsg* nlmsg, int sock, const char* name,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if SYZ_EXECUTOR || SYZ_NET_DEVICES || SYZ_NET_INJECTION || SYZ_DEVLINK_PCI
|
||||
static struct nlmsg nlmsg;
|
||||
#endif
|
||||
|
||||
#if SYZ_EXECUTOR || SYZ_NET_INJECTION
|
||||
#include <arpa/inet.h>
|
||||
#include <errno.h>
|
||||
|
@ -2362,8 +2362,6 @@ struct nlmsg {
|
||||
char buf[4096];
|
||||
};
|
||||
|
||||
static struct nlmsg nlmsg;
|
||||
|
||||
static void netlink_init(struct nlmsg* nlmsg, int typ, int flags,
|
||||
const void* data, int size)
|
||||
{
|
||||
@ -2671,6 +2669,10 @@ static void netlink_add_neigh(struct nlmsg* nlmsg, int sock, const char* name,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if SYZ_EXECUTOR || SYZ_NET_DEVICES || SYZ_NET_INJECTION || SYZ_DEVLINK_PCI
|
||||
static struct nlmsg nlmsg;
|
||||
#endif
|
||||
|
||||
#if SYZ_EXECUTOR || SYZ_NET_INJECTION
|
||||
#include <arpa/inet.h>
|
||||
#include <errno.h>
|
||||
|
Loading…
Reference in New Issue
Block a user