aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-auth-oauth-curl.c
diff options
context:
space:
mode:
authorDaniel Gustafsson <dgustafsson@postgresql.org>2025-04-03 20:37:52 +0200
committerDaniel Gustafsson <dgustafsson@postgresql.org>2025-04-03 20:37:52 +0200
commit8ae0a37932d81082ec7e4b10eb304a83c561408e (patch)
treec5bce9b883bac8a73115045a284e52529c5cdf32 /src/interfaces/libpq/fe-auth-oauth-curl.c
parent945126234bbc03a5a8f40e46383f550c08fce08e (diff)
downloadpostgresql-8ae0a37932d81082ec7e4b10eb304a83c561408e.tar.gz
postgresql-8ae0a37932d81082ec7e4b10eb304a83c561408e.zip
oauth: Fix build on platforms without epoll/kqueue
register_socket() missed a variable declaration if neither HAVE_SYS_EPOLL_H nor HAVE_SYS_EVENT_H was defined. While we're fixing that, adjust the tests to check pg_config.h for one of the multiplexer implementations, rather than assuming that Windows is the only platform without support. (Christoph reported this on hurd-amd64, an experimental Debian.) Author: Jacob Champion <jacob.champion@enterprisedb.com> Reported-by: Christoph Berg <myon@debian.org> Discussion: https://postgr.es/m/Z-sPFl27Y0ZC-VBl%40msg.df7cb.de
Diffstat (limited to 'src/interfaces/libpq/fe-auth-oauth-curl.c')
-rw-r--r--src/interfaces/libpq/fe-auth-oauth-curl.c4
1 files changed, 2 insertions, 2 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};