From d0b1b276b7249237b01a55ca1273dfbe01c775b0 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Fri, 19 Feb 2021 18:19:15 -0600 Subject: [PATCH] Sundials: Mark function as inline These two functions have a complete definition in a header file that gets including in multiple compilation units. In this case we have to mark these functions as "inline" so that the compiler emits a so-called "weak symbol". Otherwise linkage will fail due to multiply defined symbols. --- include/deal.II/sundials/sunlinsol_newempty.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/deal.II/sundials/sunlinsol_newempty.h b/include/deal.II/sundials/sunlinsol_newempty.h index b992d66c23..d0d1fb1484 100644 --- a/include/deal.II/sundials/sunlinsol_newempty.h +++ b/include/deal.II/sundials/sunlinsol_newempty.h @@ -41,7 +41,7 @@ namespace SUNDIALS * Create a new SUNLinearSolver structure without any content and * operations set to `nullptr`. */ - SUNLinearSolver + inline SUNLinearSolver SUNLinSolNewEmpty() { /* create linear solver object */ @@ -80,7 +80,7 @@ namespace SUNDIALS * * @param solver The solver memory to free */ - void + inline void SUNLinSolFreeEmpty(SUNLinearSolver solver) { if (solver == nullptr) -- 2.39.5