From ce538bc10254dbe52ea8ae66aeb0bc77605d1547 Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Tue, 11 Oct 2022 08:36:35 +0300 Subject: [PATCH] mhd_assert: use "DEBUG" macro defined by some toolchains --- src/microhttpd/mhd_assert.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/microhttpd/mhd_assert.h b/src/microhttpd/mhd_assert.h index 9513f12e..b24ce93d 100644 --- a/src/microhttpd/mhd_assert.h +++ b/src/microhttpd/mhd_assert.h @@ -32,7 +32,11 @@ #include "mhd_options.h" #if ! defined(_DEBUG) && ! defined(NDEBUG) +#ifndef DEBUG /* Used by some toolchains */ #define NDEBUG 1 /* Use NDEBUG by default */ +#else /* DEBUG */ +#define _DEBUG 1 +#endif /* DEBUG */ #endif /* !_DEBUG && !NDEBUG */ #if defined(_DEBUG) && defined(NDEBUG) #error Both _DEBUG and NDEBUG are defined