summaryrefslogtreecommitdiff
path: root/math/clad/files/patch-demos_ErrorEstimation_CustomModel_CustomModel.cpp
blob: d8e6163e4c60aaf472aef807bb5d0b6aa252c2bf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
- workaround for errors like:
- ld: error: undefined reference due to --no-allow-shlib-undefined: __progname
- >>> referenced by /lib/libc.so.7

--- demos/ErrorEstimation/CustomModel/CustomModel.cpp.orig	2023-07-19 16:59:14 UTC
+++ demos/ErrorEstimation/CustomModel/CustomModel.cpp
@@ -2,6 +2,9 @@
 
 #include "CustomModel.h"
 
+char **environ = nullptr;
+const char *__progname = "x";
+
 // Here we use the BuildOp function provided by clad to build a multiplication
 // expression that clad can generate code for.
 clang::Expr* CustomModel::AssignError(clad::StmtDiff refExpr,