Make time compare portabel + missing includes

This commit is contained in:
Willem Toorop 2014-02-11 09:57:19 +01:00
parent c6bbb5f813
commit 563c2a5335
3 changed files with 5 additions and 2 deletions

View File

@ -194,9 +194,9 @@ filechg_check(struct getdns_context *context, struct filechg *fchg)
fchg->changes = GETDNS_FCHG_MTIME | GETDNS_FCHG_CTIME; fchg->changes = GETDNS_FCHG_MTIME | GETDNS_FCHG_CTIME;
else else
{ {
if(fchg->prevstat->st_mtimespec.tv_sec != finfo->st_mtimespec.tv_sec) if(fchg->prevstat->st_mtime != finfo->st_mtime)
fchg->changes |= GETDNS_FCHG_MTIME; fchg->changes |= GETDNS_FCHG_MTIME;
if(fchg->prevstat->st_ctimespec.tv_sec != finfo->st_ctimespec.tv_sec) if(fchg->prevstat->st_ctime != finfo->st_ctime)
fchg->changes |= GETDNS_FCHG_CTIME; fchg->changes |= GETDNS_FCHG_CTIME;
GETDNS_FREE(context->my_mf, fchg->prevstat); GETDNS_FREE(context->my_mf, fchg->prevstat);
} }

View File

@ -37,6 +37,7 @@
#define _GETDNS_GENERAL_H_ #define _GETDNS_GENERAL_H_
#include <getdns/getdns.h> #include <getdns/getdns.h>
#include "types-internal.h"
/* private inner helper used by sync and async */ /* private inner helper used by sync and async */

View File

@ -35,6 +35,8 @@
*/ */
#include <getdns/getdns.h> #include <getdns/getdns.h>
#include "general.h"
#include "util-internal.h"
/* /*
* getdns_service * getdns_service