diff --git a/src/lib/dlt_user.c b/src/lib/dlt_user.c index 6d0098dbe..1f9cc76dc 100644 --- a/src/lib/dlt_user.c +++ b/src/lib/dlt_user.c @@ -4835,8 +4835,13 @@ void *dlt_user_housekeeperthread_function(void *ptr) #endif #ifdef DLT_USE_PTHREAD_SETNAME_NP +#ifdef __APPLE__ + if (pthread_setname_np("dlt_housekeeper")) + dlt_log(LOG_WARNING, "Failed to rename housekeeper thread!\n"); +#else if (pthread_setname_np(dlt_housekeeperthread_handle, "dlt_housekeeper")) dlt_log(LOG_WARNING, "Failed to rename housekeeper thread!\n"); +#endif #elif linux if (prctl(PR_SET_NAME, "dlt_housekeeper", 0, 0, 0) < 0) dlt_log(LOG_WARNING, "Failed to rename housekeeper thread!\n"); @@ -7362,7 +7367,9 @@ int dlt_start_threads() */ pthread_condattr_t attr; pthread_condattr_init(&attr); +#ifndef __APPLE__ pthread_condattr_setclock(&attr, CLOCK_MONOTONIC); +#endif pthread_cond_init(&dlt_housekeeper_running_cond, &attr); if (pthread_create(&(dlt_housekeeperthread_handle), diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 7516b90cf..fe7002536 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -27,6 +27,8 @@ if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux|CYGWIN") set(LIBRARIES "") elseif("${CMAKE_SYSTEM_NAME}" MATCHES "QNX") set(LIBRARIES regex) +elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin") + set(LIBRARIES "") else() set(LIBRARIES socket) endif()