kqueue tests: fix -fno-common build
vnode_fd and kqfd are both shared among multiple CU; define them exactly once. In the case of vnode_fd, it was simply the declaration that needed correction. -fno-common will become the default in GCC10/LLVM11. MFC after: 3 days
This commit is contained in:
parent
2750f1b954
commit
ce6a89e27c
@ -41,7 +41,8 @@
|
|||||||
#include <sys/event.h>
|
#include <sys/event.h>
|
||||||
|
|
||||||
extern char *cur_test_id;
|
extern char *cur_test_id;
|
||||||
int vnode_fd;
|
extern int vnode_fd;
|
||||||
|
extern int kqfd;
|
||||||
|
|
||||||
extern char * kevent_to_str(struct kevent *);
|
extern char * kevent_to_str(struct kevent *);
|
||||||
struct kevent * kevent_get(int);
|
struct kevent * kevent_get(int);
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
|
|
||||||
static int sigusr1_caught = 0;
|
static int sigusr1_caught = 0;
|
||||||
|
|
||||||
int kqfd;
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sig_handler(int signum)
|
sig_handler(int signum)
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
int kqfd;
|
|
||||||
int sockfd[2];
|
int sockfd[2];
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
int kqfd;
|
|
||||||
|
|
||||||
void
|
void
|
||||||
test_kevent_signal_add(void)
|
test_kevent_signal_add(void)
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
#define MS_TO_US(t) ((t) * THOUSAND) /* Convert milliseconds to microseconds. */
|
#define MS_TO_US(t) ((t) * THOUSAND) /* Convert milliseconds to microseconds. */
|
||||||
#define US_TO_NS(t) ((t) * THOUSAND) /* Convert microseconds to nanoseconds. */
|
#define US_TO_NS(t) ((t) * THOUSAND) /* Convert microseconds to nanoseconds. */
|
||||||
|
|
||||||
int kqfd;
|
|
||||||
|
|
||||||
/* Get the current time with microsecond precision. Used for
|
/* Get the current time with microsecond precision. Used for
|
||||||
* sub-second timing to make some timer tests run faster.
|
* sub-second timing to make some timer tests run faster.
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
int kqfd;
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
add_and_delete(void)
|
add_and_delete(void)
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
int kqfd;
|
|
||||||
int vnode_fd;
|
int vnode_fd;
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user