From 7794a770d35a7bf83789dcd0e7a5842ee5bf9674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net> Date: Mon, 20 Jan 2025 17:46:24 -0500 Subject: [PATCH] Conditionally #include assert.h if we're going to define macros using it --- src/xpdev/rwlockwrap.h | 4 ++++ src/xpdev/threadwrap.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/xpdev/rwlockwrap.h b/src/xpdev/rwlockwrap.h index 9ebdf27f7f..73446426ad 100644 --- a/src/xpdev/rwlockwrap.h +++ b/src/xpdev/rwlockwrap.h @@ -1,6 +1,10 @@ #ifndef RWLOCKWRAP_H #define RWLOCKWRAP_H +#ifndef NDEBUG +#include <assert.h> +#endif + #if defined(__unix__) #include <pthread.h> diff --git a/src/xpdev/threadwrap.h b/src/xpdev/threadwrap.h index a2b14212d9..c31579ab58 100644 --- a/src/xpdev/threadwrap.h +++ b/src/xpdev/threadwrap.h @@ -40,6 +40,10 @@ #endif #endif +#ifndef NDEBUG +#include <assert.h> +#endif + #if defined(__cplusplus) extern "C" { #endif -- GitLab