mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-02-06 02:52:07 +08:00
do not include pthread when compiling without threading support
This fixes the following error, when compiling for systems without
pthread support, and when passing WITH_THREADING=no to make:
thread_mosq.c:24:12: fatal error: pthread.h: No such file or directory
# include <pthread.h>
^~~~~~~~~~~
compilation terminated.
Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu>
This commit is contained in:
committed by
Roger Light
parent
2fdb5a0171
commit
79051fbdca
@@ -20,11 +20,13 @@ Contributors:
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
#if defined(WITH_THREADING)
|
||||
#if defined(__linux__) || defined(__NetBSD__)
|
||||
# include <pthread.h>
|
||||
#elif defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
# include <pthread_np.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "mosquitto_internal.h"
|
||||
#include "net_mosq.h"
|
||||
|
||||
Reference in New Issue
Block a user