mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-02-05 18:50:06 +08:00
Remove chance any includes happen before _GNU_SOURCE is set
This commit is contained in:
@@ -15,12 +15,14 @@ SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
|
||||
Contributors:
|
||||
Roger Light - initial implementation and documentation.
|
||||
*/
|
||||
#if defined(__linux__)
|
||||
# define _GNU_SOURCE /* Exposes pthread_setname_np on Linux */
|
||||
#endif
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if defined(WITH_THREADING)
|
||||
#if defined(__linux__)
|
||||
# define _GNU_SOURCE /* Exposes pthread_setname_np on Linux */
|
||||
# include <pthread.h>
|
||||
#elif defined(__NetBSD__)
|
||||
# include <pthread.h>
|
||||
|
||||
Reference in New Issue
Block a user