diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b8521270..c794866c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -380,6 +380,7 @@ if(WITH_GIT_SUBMODULE) endif() if(WITH_DLT_UNIT_TESTS) + set(DLT_IPC "UNIX_SOCKET") find_package(GTest) if(GTEST_FOUND) find_package(PkgConfig REQUIRED) diff --git a/src/daemon/dlt_daemon_unix_socket.c b/src/daemon/dlt_daemon_unix_socket.c index 8324e0239..e35f03b5b 100644 --- a/src/daemon/dlt_daemon_unix_socket.c +++ b/src/daemon/dlt_daemon_unix_socket.c @@ -145,7 +145,7 @@ int dlt_daemon_unix_socket_open(int *sock, char *sock_path, int type, int mask) addr.sun_family = AF_UNIX; memcpy(addr.sun_path, sock_path, sizeof(addr.sun_path)); - if (unlink(sock_path) != 0) { + if(unlink(sock_path) != 0 && (errno != ENOENT)) { dlt_vlog(LOG_WARNING, "%s: unlink() failed: %s\n", __func__, strerror(errno)); }