aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-06-29 10:21:52 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-06-29 10:28:36 +0200
commit34cf156b80455dd9112eb18e46fa21ae5b348582 (patch)
treecce198fbbebfcbd24105f68dd50ea8d47b8ca576
parent9cc783a87d59248fb3b1e9bb0ca2a72690a4e8c9 (diff)
llc/test: Use a portable way to set timeval variables
Using complex initialiser lists doesn't seem to work well with Debian Squeeze. This commit changes the initialisation to use separate assignments instead. Fixes: Jenkins #601, #602 Addresses: CXX LlcTest.o ../../tests/llc/LlcTest.cpp: In function 'void test_llc_meta()': ../../tests/llc/LlcTest.cpp:137: error: expected primary-expression before '.' token ../../tests/llc/LlcTest.cpp:137: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x Sponsored-by: On-Waves ehf
-rw-r--r--tests/llc/LlcTest.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/tests/llc/LlcTest.cpp b/tests/llc/LlcTest.cpp
index de392028..a2e3c5e9 100644
--- a/tests/llc/LlcTest.cpp
+++ b/tests/llc/LlcTest.cpp
@@ -133,14 +133,18 @@ static void test_llc_queue()
static void test_llc_meta()
{
gprs_llc_queue queue;
- gprs_llc_queue::MetaInfo info1 = {
- .recv_time = {123456777, 123456},
- .expire_time = {123456789, 987654},
- };
- gprs_llc_queue::MetaInfo info2 = {
- .recv_time = {987654321, 547352},
- .expire_time = {987654327, 867252},
- };
+ gprs_llc_queue::MetaInfo info1;
+ gprs_llc_queue::MetaInfo info2;
+
+ info1.recv_time.tv_sec = 123456777;
+ info1.recv_time.tv_usec = 123456;
+ info1.expire_time.tv_sec = 123456789;
+ info1.expire_time.tv_usec = 987654;
+
+ info2.recv_time.tv_sec = 987654321;
+ info2.recv_time.tv_usec = 547352;
+ info2.expire_time.tv_sec = 987654327;
+ info2.expire_time.tv_usec = 867252;
printf("=== start %s ===\n", __func__);