diff --git a/sm/csm/restrict.h b/sm/csm/restrict.h
index e62e3735a1955f8f611502b031629bd383eb939b..5582dd51e70559ee8189568688c67ef732e25015 100644
--- a/sm/csm/restrict.h
+++ b/sm/csm/restrict.h
@@ -1,6 +1,12 @@
 /* Some preprocessor magic for having fast inline functions. */
+#include <gsl/gsl_matrix.h>
+
+#ifndef INLINE
 #define INLINE static inline
+#endif
+#ifndef INLINE_DECL
 #define INLINE_DECL static inline
+#endif
 
 /* Some preprocessor magic for the "restrict" keyword:
 	http://www.cellperformance.com/mike_acton/2006/05/demystifying_the_restrict_keyw.html */