From 8febf700b3ec480342c01fe19c314df45f19d9b9 Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <schaller@strw.leidenuniv.nl>
Date: Fri, 20 Nov 2020 22:56:46 +0100
Subject: [PATCH] Fix compilation of grackle cooling with GCC

---
 src/cooling/grackle/cooling.c    | 8 ++++----
 src/cooling/grackle/cooling_io.h | 1 +
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/cooling/grackle/cooling.c b/src/cooling/grackle/cooling.c
index 7d4f88a013..85b931f5e0 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 e75ad138ee..6a1db8b68e 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
 
-- 
GitLab