From 4902811f6e602b27d77eaebd64e3b26125bc2b2e Mon Sep 17 00:00:00 2001
From: Xin LI <delphij@FreeBSD.org>
Date: Sat, 7 Dec 2024 18:06:56 -0800
Subject: [PATCH] src/apprentice.c: Do not use file_mdump when COMPILE_ONLY is
 defined.

---
 src/apprentice.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/apprentice.c b/src/apprentice.c
index cf040cdd..954450e1 100644
--- a/src/apprentice.c
+++ b/src/apprentice.c
@@ -1148,8 +1148,10 @@ apprentice_sort(const void *a, const void *b)
 				return 0;
 			file_magwarn1("Duplicate magic entry `%s'",
 			    ma->mp->desc);
+#ifndef COMPILE_ONLY
 			file_mdump(ma->mp);
 			file_mdump(mb->mp);
+#endif
 			return 0;
 		}
 		return x > 0 ? -1 : 1;
-- 
2.47.1

