From aa1364fbdf8700a2c3d2176180f92fb9a4b44251 Mon Sep 17 00:00:00 2001 From: DoctorNoobingstoneIPresume <47064117+DoctorNoobingstoneIPresume@users.noreply.github.com> Date: Mon, 15 Nov 2021 07:51:54 +0200 Subject: Support for Cygwin toolchain. (#351) Also tested with the latest version running on Windows XP (gcc-5.4.0) (http://www.crouchingtigerhiddenfruitbat.org/cygwin/timemachine.html). Signed-off-by: Adder --- src/daemon/CMakeLists.txt | 2 +- src/daemon/dlt-daemon.c | 2 +- src/daemon/dlt_daemon_common.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/daemon') diff --git a/src/daemon/CMakeLists.txt b/src/daemon/CMakeLists.txt index adddee3..e4e96bd 100644 --- a/src/daemon/CMakeLists.txt +++ b/src/daemon/CMakeLists.txt @@ -45,7 +45,7 @@ if(WITH_DLT_SHM_ENABLE) ${PROJECT_SOURCE_DIR}/src/shared/dlt_shm.c) endif() -if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") +if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux|CYGWIN") set(RT_LIBRARY rt) set(SOCKET_LIBRARY "") else() diff --git a/src/daemon/dlt-daemon.c b/src/daemon/dlt-daemon.c index 9678247..74f4049 100644 --- a/src/daemon/dlt-daemon.c +++ b/src/daemon/dlt-daemon.c @@ -1405,13 +1405,13 @@ static int dlt_daemon_init_fifo(DltDaemonLocal *daemon_local) if (fcntl(fd, F_SETPIPE_SZ, daemon_local->daemonFifoSize) == -1) dlt_vlog(LOG_ERR, "set FIFO size error: %s\n", strerror(errno)); } -#endif /* Get Daemon FIFO size */ if ((fifo_size = fcntl(fd, F_GETPIPE_SZ, 0)) == -1) dlt_vlog(LOG_ERR, "get FIFO size error: %s\n", strerror(errno)); else dlt_vlog(LOG_INFO, "FIFO size: %d\n", fifo_size); +#endif /* Early init, to be able to catch client (app) connections * as soon as possible. This registration is automatically ignored diff --git a/src/daemon/dlt_daemon_common.c b/src/daemon/dlt_daemon_common.c index e56b751..6ba5935 100644 --- a/src/daemon/dlt_daemon_common.c +++ b/src/daemon/dlt_daemon_common.c @@ -72,6 +72,7 @@ #include #include #include +#include #include /* send() */ -- cgit v1.2.1