diff --git a/celt/fixed_debug.h b/celt/fixed_debug.h
index bce02961b20f4bc3628cf2e86b96c03d35c2829b..5408d904aac79db2c6bddc91a1bef720d8a99404 100644
--- a/celt/fixed_debug.h
+++ b/celt/fixed_debug.h
@@ -35,7 +35,8 @@
 #include <stdio.h>
 
 #ifdef CELT_C
-long long celt_mips=0;
+#include "opus_defines.h"
+OPUS_EXPORT long long celt_mips=0;
 #else
 extern long long celt_mips;
 #endif
diff --git a/celt/tests/test_unit_dft.c b/celt/tests/test_unit_dft.c
index 324244f34a650717db6bab12518d67634ab31ebf..5ca38ed1fe68cfb66543b63fc42650d7ed43589a 100644
--- a/celt/tests/test_unit_dft.c
+++ b/celt/tests/test_unit_dft.c
@@ -9,10 +9,10 @@
 #endif
 
 #include <stdio.h>
-#include "kiss_fft.h"
 
 #define CELT_C
 #include "stack_alloc.h"
+#include "kiss_fft.h"
 #include "kiss_fft.c"
 #include "mathops.c"
 #include "entcode.c"
@@ -22,9 +22,6 @@
 #define M_PI 3.141592653
 #endif
 
-#ifdef FIXED_DEBUG
-long long celt_mips=0;
-#endif
 int ret = 0;
 
 void check(kiss_fft_cpx  * in,kiss_fft_cpx  * out,int nfft,int isinverse)
diff --git a/celt/tests/test_unit_mathops.c b/celt/tests/test_unit_mathops.c
index 92a79700c0d785e561b9d0b7f55510caf82b7c90..8119bc1ef30ed141fe1a89984fbd6cc04c11b656 100644
--- a/celt/tests/test_unit_mathops.c
+++ b/celt/tests/test_unit_mathops.c
@@ -24,9 +24,6 @@
 #define WORD "%f"
 #endif
 
-#ifdef FIXED_DEBUG
-long long celt_mips=0;
-#endif
 int ret = 0;
 
 void testdiv(void)
diff --git a/celt/tests/test_unit_mdct.c b/celt/tests/test_unit_mdct.c
index 07ac0ffd160c81f664124c71802a7e50edfe0b21..0de3d546ab499acc0c32612a8b3f282d51b0964e 100644
--- a/celt/tests/test_unit_mdct.c
+++ b/celt/tests/test_unit_mdct.c
@@ -9,8 +9,9 @@
 #endif
 
 #include <stdio.h>
-#include "mdct.h"
+
 #define CELT_C
+#include "mdct.h"
 #include "stack_alloc.h"
 
 #include "kiss_fft.c"
@@ -22,9 +23,6 @@
 #define M_PI 3.141592653
 #endif
 
-#ifdef FIXED_DEBUG
-long long celt_mips=0;
-#endif
 int ret = 0;
 void check(kiss_fft_scalar  * in,kiss_fft_scalar  * out,int nfft,int isinverse)
 {