diff --git a/dune/istl/repartition.hh b/dune/istl/repartition.hh
index 2ec86bf0eed73279b9f5e77555a8df6c648e8969..21fbbe09da07bd1c4505896ddb051f80257022f5 100644
--- a/dune/istl/repartition.hh
+++ b/dune/istl/repartition.hh
@@ -8,12 +8,24 @@
 #include <utility>
 
 #if HAVE_PARMETIS
+// Explicitly use C linkage as scotch does not extern "C" in its headers.
+// Works because ParMETIS/METIS checks whether compiler is C++ and otherwise
+// does not use extern "C". Therfore no nested extern "C" will be created
+extern "C"
+{
 #include <parmetis.h>
+}
 #endif
 #if defined(METISNAMEL) && defined(HAVE_METIS)
 // METISNAMEL is defined when scotch is used and according to christian
 // we have to include the metis header in this case.
+// Explicitly use C linkage as scotch does not extern "C" in its headers.
+// Works because ParMETIS/METIS checks whether compiler is C++ and otherwise
+// does not use extern "C". Therfore no nested extern "C" will be created
+extern "C"
+{
 #include <metis.h>
+}
 #endif
 
 #include <dune/common/timer.hh>