diff --git a/src/common/xmalloc.c b/src/common/xmalloc.c
index 23270f93df727160d8438af949c56fececfb97f7..37bcbfa1aef8e8757da7161575078565000d37c7 100644
--- a/src/common/xmalloc.c
+++ b/src/common/xmalloc.c
@@ -63,6 +63,7 @@ static void malloc_assert_failed(char *, const char *, int,
           } while (0)
 #endif /* NDEBUG */
 
+#define XMALLOC_MAGIC 0x42
 
 /*
  * "Safe" version of malloc().
diff --git a/src/common/xmalloc.h b/src/common/xmalloc.h
index 8bab5e5c6a2e92c66f0e617dcfea0c59fcdeb800..282e6eb09097bac080f7989eccf453e17f11afa8 100644
--- a/src/common/xmalloc.h
+++ b/src/common/xmalloc.h
@@ -97,6 +97,4 @@ void slurm_xfree(void **, const char *, int, const char *);
 void *slurm_xrealloc(void **, size_t, bool, const char *, int, const char *);
 size_t slurm_xsize(void *, const char *, int, const char *);
 
-#define XMALLOC_MAGIC 0x42
-
 #endif /* !_XMALLOC_H */