diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/interfaces/libpq/fe-auth-oauth-curl.c | 4 | ||||
-rw-r--r-- | src/test/modules/oauth_validator/t/001_server.pl | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/interfaces/libpq/fe-auth-oauth-curl.c b/src/interfaces/libpq/fe-auth-oauth-curl.c index 9e0e8a9f2be..cd9c0323bb6 100644 --- a/src/interfaces/libpq/fe-auth-oauth-curl.c +++ b/src/interfaces/libpq/fe-auth-oauth-curl.c @@ -1172,8 +1172,9 @@ static int register_socket(CURL *curl, curl_socket_t socket, int what, void *ctx, void *socketp) { -#ifdef HAVE_SYS_EPOLL_H struct async_ctx *actx = ctx; + +#ifdef HAVE_SYS_EPOLL_H struct epoll_event ev = {0}; int res; int op = EPOLL_CTL_ADD; @@ -1231,7 +1232,6 @@ register_socket(CURL *curl, curl_socket_t socket, int what, void *ctx, return 0; #endif #ifdef HAVE_SYS_EVENT_H - struct async_ctx *actx = ctx; struct kevent ev[2] = {0}; struct kevent ev_out[2]; struct timespec timeout = {0}; diff --git a/src/test/modules/oauth_validator/t/001_server.pl b/src/test/modules/oauth_validator/t/001_server.pl index 30295364ebd..d88994abc24 100644 --- a/src/test/modules/oauth_validator/t/001_server.pl +++ b/src/test/modules/oauth_validator/t/001_server.pl @@ -26,9 +26,11 @@ if (!$ENV{PG_TEST_EXTRA} || $ENV{PG_TEST_EXTRA} !~ /\boauth\b/) 'Potentially unsafe test oauth not enabled in PG_TEST_EXTRA'; } -if ($windows_os) +unless (check_pg_config("#define HAVE_SYS_EVENT_H 1") + or check_pg_config("#define HAVE_SYS_EPOLL_H 1")) { - plan skip_all => 'OAuth server-side tests are not supported on Windows'; + plan skip_all => + 'OAuth server-side tests are not supported on this platform'; } if ($ENV{with_libcurl} ne 'yes') |