From 34cf156b80455dd9112eb18e46fa21ae5b348582 Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Mon, 29 Jun 2015 10:21:52 +0200 Subject: 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 --- tests/llc/LlcTest.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'tests') 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__); -- cgit v1.2.3