Skip to content

Commit e9fd554

Browse files
committed
Try to fix busted gettimeofday() code.
Per buildfarm, we have to match the _stdcall property of the system functions.
1 parent 332f02f commit e9fd554

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/port/gettimeofday.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030

3131
#include <sys/time.h>
3232

33-
static void init_gettimeofday(LPFILETIME lpSystemTimeAsFileTime);
34-
3533
/* FILETIME of Jan 1 1970 00:00:00, the PostgreSQL epoch */
3634
static const unsigned __int64 epoch = UINT64CONST(116444736000000000);
3735

@@ -49,6 +47,9 @@ static const unsigned __int64 epoch = UINT64CONST(116444736000000000);
4947
*/
5048
typedef VOID (WINAPI *PgGetSystemTimeFn)(LPFILETIME);
5149

50+
/* One-time initializer function, must match that signature. */
51+
static void WINAPI init_gettimeofday(LPFILETIME lpSystemTimeAsFileTime);
52+
5253
/* Storage for the function we pick at runtime */
5354
static PgGetSystemTimeFn pg_get_system_time = &init_gettimeofday;
5455

@@ -57,7 +58,7 @@ static PgGetSystemTimeFn pg_get_system_time = &init_gettimeofday;
5758
* is available and if so, plan to use it; if not, fall back to
5859
* GetSystemTimeAsFileTime.
5960
*/
60-
static void
61+
static void WINAPI
6162
init_gettimeofday(LPFILETIME lpSystemTimeAsFileTime)
6263
{
6364
/*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy