diff --git a/build_lite/BUILD.gn b/build_lite/BUILD.gn index beaf6e912a0833c25a4fc6ea12cb66d38cbc0c38..ddd8987c7aef6677c70b3e8ce6d34d7b006538ce 100644 --- a/build_lite/BUILD.gn +++ b/build_lite/BUILD.gn @@ -95,6 +95,7 @@ lite_component("acts_component") { "//test/xts/acts/appexecfwk_lite/appexecfwk_posix:ActsBundleMgrTest", "//test/xts/acts/aafwk_lite/ability_posix:ActsAbilityMgrTest", "//test/xts/acts/ai_lite/ai_engine_posix/base:ActsAiEngineTest", + "//test/xts/acts/communication_lite/lwip_posix:ActsLwipTest", ] } } diff --git a/communication_lite/lwip_posix/BUILD.gn b/communication_lite/lwip_posix/BUILD.gn index b2cdd09419168e6a6e7e0773d8bcc6596659addf..bbbcef843886aa38d150775932d7a13e18a08eb7 100755 --- a/communication_lite/lwip_posix/BUILD.gn +++ b/communication_lite/lwip_posix/BUILD.gn @@ -25,4 +25,10 @@ hcpptest_suite("ActsLwipTest") { deps = ["//third_party/bounds_checking_function:libsec_shared" ] cflags = [ "-Wno-error" ] + + ldflags = [ + "-lstdc++", + "-lm", + "-lpthread", + ] } diff --git a/communication_lite/lwip_posix/src/ActsLwipTest.cpp b/communication_lite/lwip_posix/src/ActsLwipTest.cpp index 288deb26a6122972164a3e5c495af3cd14ffda5c..ca6d2019e4ccbeb117df9b7d66102893f9afd621 100755 --- a/communication_lite/lwip_posix/src/ActsLwipTest.cpp +++ b/communication_lite/lwip_posix/src/ActsLwipTest.cpp @@ -413,7 +413,8 @@ static int SelectServerForFork(unsigned int timeoutSec) char dataBuf[50] = {0}; int fds[TEST_FD_COUNT] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; fds[0] = srvFd; - struct timeval timev = {.tv_sec = timeoutSec, .tv_usec = 0}; + long timeout = timeoutSec; + struct timeval timev = {.tv_sec = timeout, .tv_usec = 0}; struct sockaddr_in clnAddr = {0}; socklen_t clnAddrLen = sizeof(clnAddr); while (1) {