Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ dnl ######################################################################

AC_CHECK_LIB(m, sqrt)
AC_CHECK_LIB(rt, clock_gettime)
AC_CHECK_LIB(pthread, clock_gettime)
AC_CHECK_LIB(dl, dlopen)

dnl ######################################################################
Expand Down
4 changes: 0 additions & 4 deletions libutils/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,6 @@ struct utsname
# define IPV6_V6ONLY 27
# endif

// Not available in MinGW headers unless you raise WINVER and _WIN32_WINNT, but
// that is very badly supported in MinGW ATM.
ULONGLONG WINAPI GetTickCount64(void);

#else /* !__MINGW32__ */
# include <syslog.h>
#endif
Expand Down
14 changes: 14 additions & 0 deletions libutils/signal_lib.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
#include <signal.h>

#ifndef CFENGINE_SIGNAL_LIB_H
#define CFENGINE_SIGNAL_LIB_H

/**
* from pthreads-w32 pthread_kill manpage
* Pthreads-w32 does not implement signals yet and so these routines have almost no use except to prevent the compiler or linker from complaining.
* So on Windows pthreads-w32 there is no sigemptyset() or sigaddset() and pthread_sigmask() is essentially a no-op, so skip it.
*/
#ifndef __MINGW32__

static inline void MaskTerminationSignalsInThread()
{
/* Mask termination signals in a thread so that they always end up in the
Expand All @@ -13,3 +25,5 @@ static inline void MaskTerminationSignalsInThread()
ret = pthread_sigmask(SIG_BLOCK, &th_sigset, NULL);
assert(ret == 0);
}
#endif
#endif
Loading