diff options
| author | Piotr Pawlow <pp@siedziba.pl> | 2014-03-13 21:49:48 +0100 |
|---|---|---|
| committer | Piotr Pawlow <pp@siedziba.pl> | 2014-03-13 21:49:48 +0100 |
| commit | deb09311466b12dbce59deb4febc73e7d5798006 (patch) | |
| tree | 473ca78dcff60218fce82383aba3f8dc1acdc65d /src | |
| parent | aff3ba3e8b21d8ac4599f3dfa387777783d7f897 (diff) | |
- define timeradd if sys/time.h doesn't define it
Diffstat (limited to 'src')
| -rw-r--r-- | src/lingot-core.c | 13 |
1 files changed, 13 insertions, 0 deletions
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); |
