diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-06-22 17:39:03 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-06-22 17:39:03 +0400 |
commit | e9d2ad6a1b942cb5bbba9a268cc7e0108a0145ea (patch) | |
tree | a22232f181b0b6e0af3056869c666578fa30c0c0 /src/evdns | |
parent | d81433607b87acf08bab4ccb5a01f1c992dfb8bb (diff) | |
download | rspamd-e9d2ad6a1b942cb5bbba9a268cc7e0108a0145ea.tar.gz rspamd-e9d2ad6a1b942cb5bbba9a268cc7e0108a0145ea.zip |
* Rewrite buffered input for line policy (again)
* Fix issue with links that are ip addresses in numeric form in surbl
* On Darwin use BSD style sendfile definition
* Reorganize platform specific knobs in CMakeLists
* Use gettimeofday on systems that have not clock_getres
* Use ftime for dns trans id generation on systems without clock_getres
Diffstat (limited to 'src/evdns')
-rw-r--r-- | src/evdns/evdns.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/evdns/evdns.c b/src/evdns/evdns.c index e399a14a0..b19da2229 100644 --- a/src/evdns/evdns.c +++ b/src/evdns/evdns.c @@ -1126,6 +1126,7 @@ static u16 default_transaction_id_fn(void) { u16 trans_id; +#ifdef HAVE_CLOCK_GETTIME struct timespec ts; static int clkid = -1; if (clkid == -1) { @@ -1135,6 +1136,13 @@ default_transaction_id_fn(void) } clock_gettime(clkid, &ts); trans_id = ts.tv_nsec & 0xffff; +#elif defined(HAVE_SYS_TIMEDB_H) + struct timeb tb; + ftime(&tb); + trans_id = tb.millitm & 0xffff; +#else +# error Cannot find way to generate dns transaction id +#endif return trans_id; } |