From 9369eb452e290d3d125ac4f9abf9cb8012e08ad7 Mon Sep 17 00:00:00 2001
From: 3gg <3gg@shellblade.net>
Date: Sat, 13 Apr 2024 12:21:14 -0700
Subject: Undef log macros if they are already defined to redefine them without
 warnings.

---
 log/include/log/log.h | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'log')

diff --git a/log/include/log/log.h b/log/include/log/log.h
index 8f12b09..bd0c20c 100644
--- a/log/include/log/log.h
+++ b/log/include/log/log.h
@@ -2,6 +2,14 @@
 
 #include <stdio.h>
 
+// Undef any previously defined log macros (from cassert.h, for example) to
+// redefine them without compiler warnings.
+#undef LOG
+#undef LOGD
+#undef LOGI
+#undef LOGW
+#undef LOGE
+
 #define LOG(channel, tag, format, ...)                      \
   {                                                         \
     fprintf(                                                \
-- 
cgit v1.2.3