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:
Kyle Evans 2020-04-06 23:08:07 +00:00
parent 2750f1b954
commit ce6a89e27c
7 changed files with 2 additions and 7 deletions

View File

@ -41,7 +41,8 @@
#include <sys/event.h>
extern char *cur_test_id;
int vnode_fd;
extern int vnode_fd;
extern int kqfd;
extern char * kevent_to_str(struct kevent *);
struct kevent * kevent_get(int);

View File

@ -25,7 +25,6 @@
static int sigusr1_caught = 0;
int kqfd;
static void
sig_handler(int signum)

View File

@ -18,7 +18,6 @@
#include "common.h"
int kqfd;
int sockfd[2];
static void

View File

@ -18,7 +18,6 @@
#include "common.h"
int kqfd;
void
test_kevent_signal_add(void)

View File

@ -26,7 +26,6 @@
#define MS_TO_US(t) ((t) * THOUSAND) /* Convert milliseconds to microseconds. */
#define US_TO_NS(t) ((t) * THOUSAND) /* Convert microseconds to nanoseconds. */
int kqfd;
/* Get the current time with microsecond precision. Used for
* sub-second timing to make some timer tests run faster.

View File

@ -18,7 +18,6 @@
#include "common.h"
int kqfd;
static void
add_and_delete(void)

View File

@ -18,7 +18,6 @@
#include "common.h"
int kqfd;
int vnode_fd;
void