diff --git a/src/cooling/grackle/cooling.c b/src/cooling/grackle/cooling.c
index 7d4f88a013a0dd7172d126faa2f8e215675a977b..85b931f5e049b8cac220cf68f20c32f4a18186d4 100644
--- a/src/cooling/grackle/cooling.c
+++ b/src/cooling/grackle/cooling.c
@@ -264,8 +264,8 @@ void cooling_first_init_part(const struct phys_const* restrict phys_const,
  * @param p The particle.
  * @param xp The extended particle data.
  */
-INLINE static float cooling_get_subgrid_temperature(const struct part* p,
-                                                    const struct xpart* xp) {
+float cooling_get_subgrid_temperature(const struct part* p,
+                                      const struct xpart* xp) {
   error("This cooling model does not use subgrid quantities!");
   return -1.f;
 }
@@ -278,8 +278,8 @@ INLINE static float cooling_get_subgrid_temperature(const struct part* p,
  * @param p The particle.
  * @param xp The extended particle data.
  */
-INLINE static float cooling_get_subgrid_density(const struct part* p,
-                                                const struct xpart* xp) {
+float cooling_get_subgrid_density(const struct part* p,
+                                  const struct xpart* xp) {
   error("This cooling model does not use subgrid quantities!");
   return -1.f;
 }
diff --git a/src/cooling/grackle/cooling_io.h b/src/cooling/grackle/cooling_io.h
index e75ad138ee2fd71a5b490a22651fd2266f867fcc..6a1db8b68ed13c5dbfef5dfeb00e76ecd3213ae7 100644
--- a/src/cooling/grackle/cooling_io.h
+++ b/src/cooling/grackle/cooling_io.h
@@ -23,6 +23,7 @@
 #include "cooling_properties.h"
 #include "cooling_struct.h"
 #include "io_properties.h"
+#include "physical_constants.h"
 
 #ifdef HAVE_HDF5