@ -39,6 +39,7 @@ Clients:
Build:
- Fixes for building on NetBSD. Closes #258.
- Fixes for building on FreeBSD.
1.5 - 20180502
@ -29,13 +29,13 @@
#ifdef __APPLE__
# define __DARWIN_C_SOURCE
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__SYMBIAN32__) || defined(__QNX__)
# define _XOPEN_SOURCE 700
# define __BSD_VISIBLE 1
# define HAVE_NETINET_IN_H
#else
# define _DEFAULT_SOURCE 1
# define _POSIX_C_SOURCE 200809L
#endif
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__SYMBIAN32__) || defined(__QNX__)
@ -15,6 +15,7 @@ Contributors:
*/
#define _GNU_SOURCE
#include "config.h"
#include <assert.h>
#include <errno.h>
@ -68,8 +69,6 @@ Contributors:
#include "time_mosq.h"
#include "util_mosq.h"
#ifdef WITH_TLS
int tls_ex_index_mosq = -1;
@ -17,7 +17,7 @@ Contributors:
#ifndef WIN32
#include <unistd.h>
#include <time.h>
#include "mosquitto_internal.h"
@ -80,6 +80,11 @@ void *mosquitto__thread_main(void *obj)
{
struct mosquitto *mosq = obj;
int state;
struct timespec ts;
ts.tv_sec = 0;
ts.tv_nsec = 10000000;
if(!mosq) return NULL;
@ -91,7 +96,7 @@ void *mosquitto__thread_main(void *obj)
#ifdef WIN32
Sleep(10);
usleep(10000);
nanosleep(&ts, NULL);
}else{
break;