From deb09311466b12dbce59deb4febc73e7d5798006 Mon Sep 17 00:00:00 2001 From: Piotr Pawlow Date: Thu, 13 Mar 2014 21:49:48 +0100 Subject: - define timeradd if sys/time.h doesn't define it --- src/lingot-core.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/lingot-core.c b/src/lingot-core.c index a7554a6..0d5c31f 100644 --- a/src/lingot-core.c +++ b/src/lingot-core.c @@ -38,6 +38,19 @@ #include "lingot-i18n.h" #include "lingot-msg.h" +#ifndef timeradd +#define timeradd(a, b, result) \ + do { \ + (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \ + (result)->tv_usec = (a)->tv_usec + (b)->tv_usec; \ + if ((result)->tv_usec >= 1000000) \ + { \ + ++(result)->tv_sec; \ + (result)->tv_usec -= 1000000; \ + } \ + } while (0) +#endif + int lingot_core_read_callback(FLT* read_buffer, int read_buffer_size, void *arg); -- cgit v1.2.3