From 293873e0a3c4702931ba505860c2a77c551cfa85 Mon Sep 17 00:00:00 2001
From: Mathieu Faverge <mathieu.faverge@inria.fr>
Date: Tue, 12 Mar 2024 20:16:29 +0100
Subject: [PATCH] header: Fix the includes required in headers and remove
 duplicated declaration of MPI_COMM_WORLD

---
 include/chameleon/runtime_struct.h | 9 +++++++--
 include/chameleon/struct.h         | 2 ++
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/include/chameleon/runtime_struct.h b/include/chameleon/runtime_struct.h
index e0282d6ae..362af6e86 100644
--- a/include/chameleon/runtime_struct.h
+++ b/include/chameleon/runtime_struct.h
@@ -23,6 +23,13 @@
 #ifndef _chameleon_runtime_struct_h_
 #define _chameleon_runtime_struct_h_
 
+#include "chameleon/types.h"
+
+BEGIN_C_DECLS
+
+/**
+ * Datatype for distributed version
+ */
 #if defined(CHAMELEON_USE_MPI)
 #include <mpi.h>
 #else
@@ -34,8 +41,6 @@ typedef uintptr_t MPI_Comm;
 #endif
 #endif
 
-BEGIN_C_DECLS
-
 /**
  * @brief Ids of the runtime supported by the RUNTIME API
  */
diff --git a/include/chameleon/struct.h b/include/chameleon/struct.h
index abcaade24..053cddd61 100644
--- a/include/chameleon/struct.h
+++ b/include/chameleon/struct.h
@@ -25,6 +25,8 @@
 #ifndef _chameleon_struct_h_
 #define _chameleon_struct_h_
 
+#include "chameleon/config.h"
+#include "chameleon/types.h"
 #include "chameleon/constants.h"
 
 BEGIN_C_DECLS
-- 
GitLab