From e2d0288cb16222c9d63b09a52908e7d3295ca849 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Fri, 3 Dec 2021 10:22:58 +0800 Subject: [PATCH] Include sys/time.h for gettimeofday Fixes https://github.com/psycopg/psycopg2/issues/1397 --- psycopg/libpq_support.c | 1 + psycopg/replication_cursor_type.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/psycopg/libpq_support.c b/psycopg/libpq_support.c index d259eca5..712102ee 100644 --- a/psycopg/libpq_support.c +++ b/psycopg/libpq_support.c @@ -38,6 +38,7 @@ #include "psycopg/win32_support.h" #else #include +#include #endif /* support routines taken from pg_basebackup/streamutil.c */ diff --git a/psycopg/replication_cursor_type.c b/psycopg/replication_cursor_type.c index ab3ad3c4..76f75630 100644 --- a/psycopg/replication_cursor_type.c +++ b/psycopg/replication_cursor_type.c @@ -34,6 +34,9 @@ #include #include +#ifndef _WIN32 +#include +#endif /* python */ #include "datetime.h"