--- inkscape-1.4/src/path/splinefit/bezier-fit.cpp.orig	2024-04-22 23:00:30.000000000 +0200
+++ inkscape-1.4/src/path/splinefit/bezier-fit.cpp	2025-03-21 10:49:28.435697100 +0100
@@ -6,10 +6,8 @@
 #include <2geom/bezier-utils.h>
 #include <2geom/point.h>
 
-extern "C" {
-    #include "splinefit.h"
-    #include "splinefont.h"
-}
+#include "splinefit.h"
+#include "splinefont.h"
 
 int bezier_fit(Geom::Point bezier[4], const std::vector<InputPoint>& data) {
 
--- inkscape-1.4/src/path/splinefit/splinefit.h.orig	2025-03-21 10:52:34.186659100 +0100
+++ inkscape-1.4/src/path/splinefit/splinefit.h	2025-03-21 10:54:28.278931500 +0100
@@ -32,6 +32,10 @@
 // #include <fontforge-config.h>
 #include "splinefont.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct fitpoint {
     BasePoint p;
     BasePoint ut;
@@ -75,4 +79,9 @@
                                                 bigreal toler, int toler_is_sumsq,
                                                 GenPointsP genp, void *tok, int order2);
 
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* FONTFORGE_SPLINEFIT_H */
--- inkscape-1.4/src/path/splinefit/splinefont.h.orig	2024-04-22 23:00:30.000000000 +0200
+++ inkscape-1.4/src/path/splinefit/splinefont.h	2025-03-21 10:53:55.135773000 +0100
@@ -5,6 +5,10 @@
 
 #include <glib.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef double real;
 typedef double bigreal;
 typedef double extended;
@@ -188,4 +192,8 @@
 
 void SplinesRemoveBetween(SplinePoint *from, SplinePoint *to, int type);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // _SEEN_SPLINEFONT_H_
