server: sync timediff_t type across modules

This commit is contained in:
Viktor Szakats 2025-02-26 17:12:12 +01:00
parent 0d03d7dd09
commit 89a258828d
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201
2 changed files with 4 additions and 2 deletions

View File

@ -54,6 +54,7 @@
#include "getpart.h"
#include "util.h"
#include "timeval.h"
#include "timediff.h"
#ifdef USE_WINSOCK
#undef EINTR
@ -64,6 +65,8 @@
const char *serverlogfile = "log/server_default.log";
static long timediff(struct timeval newer, struct timeval older);
static struct timeval tvnow(void);
/* This function returns a pointer to STATIC memory. It converts the given
@ -457,7 +460,7 @@ static struct timeval tvnow(void)
#endif
long timediff(struct timeval newer, struct timeval older)
static long timediff(struct timeval newer, struct timeval older)
{
timediff_t diff = newer.tv_sec-older.tv_sec;
if(diff >= (LONG_MAX/1000))

View File

@ -37,7 +37,6 @@ enum {
char *data_to_hex(char *data, size_t len);
void logmsg(const char *msg, ...) CURL_PRINTF(1, 2);
long timediff(struct timeval newer, struct timeval older);
#define SERVERLOGS_LOCKDIR "lock" /* within logdir */