diff options
author | Michał Łyszczek <michal.lyszczek@bofc.pl> | 2018-10-10 22:46:19 +0200 |
---|---|---|
committer | Michał Łyszczek <michal.lyszczek@bofc.pl> | 2019-06-08 23:20:39 +0200 |
commit | 98b8df40014e46f257becdfe59cf4173bb8383c3 (patch) | |
tree | b806d26728a61ebcedca7ed1d138199cfac0b4fd | |
parent | 09a3a1cc5687ca5caca82b2e23ffafb5155a10f1 (diff) | |
download | embedlog-98b8df40014e46f257becdfe59cf4173bb8383c3.tar.gz embedlog-98b8df40014e46f257becdfe59cf4173bb8383c3.tar.bz2 embedlog-98b8df40014e46f257becdfe59cf4173bb8383c3.zip |
fix: add missing #ifdef LLONG_MAX in binary tests
This caused error failure on machines where long long is
not available
-rw-r--r-- | tst/test-el-pbinary.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tst/test-el-pbinary.c b/tst/test-el-pbinary.c index 40324d5..f834dfe 100644 --- a/tst/test-el-pbinary.c +++ b/tst/test-el-pbinary.c @@ -119,7 +119,12 @@ static int pbinary_check(void) size_t msglen; size_t len; unsigned char flags; + +#ifdef LLONG_MAX unsigned long long val; +#else + unsigned long val; +#endif /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ @@ -168,7 +173,11 @@ static int pbinary_check(void) if (g_options.timestamp != EL_TS_OFF) { +# ifdef LLONG_MAX unsigned long long tmp; +# else + unsigned long tmp; +# endif /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ len = el_decode_number(msg, &tmp); @@ -194,7 +203,11 @@ static int pbinary_check(void) if (g_options.timestamp_fractions) { +# ifdef LLONG_MAX unsigned long long usec; +# else + unsigned long usec; +# endif /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ len = el_decode_number(msg, &usec); |