Remove chance any includes happen before _GNU_SOURCE is set

This commit is contained in:
Roger A. Light
2025-08-27 14:09:31 +01:00
parent 92cc2a159f
commit 5f2717cc9d

View File

@@ -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>