From: Piotr Sawicki Date: Tue, 16 May 2017 13:42:11 +0000 (+0200) Subject: Fix compilation on 64-bit archs X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F86%2F129486%2F1;p=platform%2Fcore%2Ftest%2Fsecurity-tests.git Fix compilation on 64-bit archs Change-Id: I7ded3027c4d1409f13c46d963fa964650f875c39 --- diff --git a/src/nether-tests/nether_tests.cpp b/src/nether-tests/nether_tests.cpp index ca14f38e..dbfe7462 100644 --- a/src/nether-tests/nether_tests.cpp +++ b/src/nether-tests/nether_tests.cpp @@ -572,14 +572,14 @@ public: } struct sockaddr_in clntAddress; - size_t clntAddressLength = sizeof(clntAddress); + socklen_t clntAddressLength = static_cast(sizeof(clntAddress)); char receiveBuffer[NET_BUFFER_SIZE]; notifyManager(pipeFd); while (true) { ssize_t len = TEMP_FAILURE_RETRY(recvfrom(sockFd, receiveBuffer, sizeof(receiveBuffer), 0, - reinterpret_cast(&clntAddress), static_cast(&clntAddressLength))); + reinterpret_cast(&clntAddress), &clntAddressLength)); if (len == -1) { exit(EXIT_FAILURE); @@ -753,14 +753,14 @@ public: } struct sockaddr_in clntAddress; - size_t clntAddressLength = sizeof(clntAddress); + socklen_t clntAddressLength = static_cast(sizeof(clntAddress)); char receiveBuffer[NET_BUFFER_SIZE]; notifyManager(pipeFd); while (true) { int acceptedSocketFd = TEMP_FAILURE_RETRY(accept(sockFd, reinterpret_cast(&clntAddress), - static_cast(&clntAddressLength))); + &clntAddressLength)); if (acceptedSocketFd == -1) { exit(EXIT_FAILURE); }