MeshLink_ATTRIBUTE(__warn_unused_result__)
dnl Checks for library functions.
-AC_CHECK_FUNCS([asprintf fchmod fork gettimeofday random pselect select setns strdup usleep getifaddrs freeifaddrs],
+AC_CHECK_FUNCS([asprintf fchmod flock fork gettimeofday random pselect select setns strdup usleep getifaddrs freeifaddrs],
[], [], [#include "$srcdir/src/have.h"]
)
fcntl(fileno(mesh->lockfile), F_SETFD, FD_CLOEXEC);
#endif
-#ifdef HAVE_MINGW
- // TODO: use _locking()?
-#else
+#ifdef HAVE_FLOCK
if(flock(fileno(mesh->lockfile), LOCK_EX | LOCK_NB) != 0) {
logger(NULL, MESHLINK_ERROR, "Cannot lock %s: %s\n", lock_filename, strerror(errno));