diff options
author | Angelo Mantellini <manangel@cisco.com> | 2019-01-31 10:36:54 +0100 |
---|---|---|
committer | Angelo Mantellini <manangel@cisco.com> | 2019-01-31 11:17:49 +0100 |
commit | 7b61129b2ed89d2cc3ca5560f55c26c6c347a215 (patch) | |
tree | 5c2433fdcc0447f05f79a981a6e8287e61182038 /libtransport | |
parent | 67371907c2433f5233d4a669a1c9176539e9928f (diff) |
[HICN-20] This source upgrade allows to compile ping_client, ping_server and hiperf (utils folder) in Windows.
Change-Id: I8253aa9aa640644b0daffd95dff202956371d814
Signed-off-by: Angelo Mantellini <manangel@cisco.com>
Diffstat (limited to 'libtransport')
-rw-r--r-- | libtransport/src/hicn/transport/utils/CMakeLists.txt | 14 | ||||
-rw-r--r-- | libtransport/src/hicn/transport/utils/daemonizator.cc | 3 | ||||
-rw-r--r-- | libtransport/src/hicn/transport/utils/daemonizator.h | 7 |
3 files changed, 19 insertions, 5 deletions
diff --git a/libtransport/src/hicn/transport/utils/CMakeLists.txt b/libtransport/src/hicn/transport/utils/CMakeLists.txt index 088fb5862..a5daf785e 100644 --- a/libtransport/src/hicn/transport/utils/CMakeLists.txt +++ b/libtransport/src/hicn/transport/utils/CMakeLists.txt @@ -16,8 +16,6 @@ cmake_minimum_required(VERSION 3.5 FATAL_ERROR) list(APPEND SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/string_tokenizer.cc ${CMAKE_CURRENT_SOURCE_DIR}/uri.cc - ${CMAKE_CURRENT_SOURCE_DIR}/daemonizator.cc - ${CMAKE_CURRENT_SOURCE_DIR}/min_filter.h ${CMAKE_CURRENT_SOURCE_DIR}/signer.cc ${CMAKE_CURRENT_SOURCE_DIR}/verifier.cc ${CMAKE_CURRENT_SOURCE_DIR}/identity.cc @@ -32,7 +30,6 @@ list(APPEND HEADER_FILES ${CMAKE_CURRENT_SOURCE_DIR}/string_tokenizer.h ${CMAKE_CURRENT_SOURCE_DIR}/hash.h ${CMAKE_CURRENT_SOURCE_DIR}/uri.h - ${CMAKE_CURRENT_SOURCE_DIR}/daemonizator.h ${CMAKE_CURRENT_SOURCE_DIR}/sharable_vector.h ${CMAKE_CURRENT_SOURCE_DIR}/branch_prediction.h ${CMAKE_CURRENT_SOURCE_DIR}/event_reactor.h @@ -72,5 +69,14 @@ if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") ) endif() +if(NOT WIN32) + list(APPEND HEADER_FILES + ${CMAKE_CURRENT_SOURCE_DIR}/daemonizator.h + ) + list(APPEND SOURCE_FILES + ${CMAKE_CURRENT_SOURCE_DIR}/daemonizator.cc + ) +endif() + set(SOURCE_FILES ${SOURCE_FILES} PARENT_SCOPE) -set(HEADER_FILES ${HEADER_FILES} PARENT_SCOPE) +set(HEADER_FILES ${HEADER_FILES} PARENT_SCOPE)
\ No newline at end of file diff --git a/libtransport/src/hicn/transport/utils/daemonizator.cc b/libtransport/src/hicn/transport/utils/daemonizator.cc index d9b3109af..c51a68d14 100644 --- a/libtransport/src/hicn/transport/utils/daemonizator.cc +++ b/libtransport/src/hicn/transport/utils/daemonizator.cc @@ -13,6 +13,7 @@ * limitations under the License. */ +#ifndef _WIN32 #include <hicn/transport/errors/runtime_exception.h> #include <hicn/transport/utils/daemonizator.h> #include <hicn/transport/utils/log.h> @@ -71,3 +72,5 @@ void Daemonizator::daemonize(bool close_fds) { } } // namespace utils + +#endif diff --git a/libtransport/src/hicn/transport/utils/daemonizator.h b/libtransport/src/hicn/transport/utils/daemonizator.h index a21ce8a7b..028d74865 100644 --- a/libtransport/src/hicn/transport/utils/daemonizator.h +++ b/libtransport/src/hicn/transport/utils/daemonizator.h @@ -14,6 +14,9 @@ */ #pragma once + +#ifndef _WIN32 + #include <cstdlib> namespace utils { @@ -22,4 +25,6 @@ class Daemonizator { static void daemonize(bool close_fds = true); }; -} // namespace utils
\ No newline at end of file +} // namespace utils + +#endif
\ No newline at end of file |