-// fixme: dirty hack
-#if defined(XBT_RUNNING_CTX_INITIALIZER)
-# define MSG_WAIT_DESTROYS_COMMS 0
-#else
-# define MSG_WAIT_DESTROYS_COMMS 1
-#endif
+/* What is defined here:
+ * =====================
+ *
+ * MSG_WAIT_DESTROYS_COMMS 1 if MSG_wait destroys communications
+ * (has changed after SimGrid 3.5)
+ */
+
+#if !defined(SIMGRID_VERSION) // ========== SimGrid <= 3.5 ============= //
+
+#define MSG_WAIT_DESTROYS_COMMS 1
+
+#else // ================================= SimGrid > 3.5 ============== //
+
+#define MSG_WAIT_DESTROYS_COMMS 0
+
+#endif // ============================================================= //