diff --git a/src/DynamicModel.cc b/src/DynamicModel.cc
index 1e32668295a31e187c78e7233a4f51ade6924708..ca196beff3ca9ee888534468f68d685f38e2b503 100644
--- a/src/DynamicModel.cc
+++ b/src/DynamicModel.cc
@@ -1215,14 +1215,7 @@ DynamicModel::writeDynamicCFile(const string &basename) const
 
   if (external_functions_table.get_total_number_of_unique_model_block_external_functions())
     // External Matlab function, implies Dynamic function will call mex
-    mDynamicModelFile
-#ifndef __APPLE__
-      << "#include <uchar.h>" << endl // For MATLAB ≤ R2011a
-#else
-      << "typedef uint_least16_t char16_t;" << endl
-      << "typedef uint_least32_t char32_t;" << endl // uchar.h does not exist on macOS
-#endif
-      << R"(#include "mex.h")" << endl;
+    mDynamicModelFile << R"(#include "mex.h")" << endl;
 
   mDynamicModelFile << "#define max(a, b) (((a) > (b)) ? (a) : (b))" << endl
                     << "#define min(a, b) (((a) > (b)) ? (b) : (a))" << endl;
@@ -1258,12 +1251,6 @@ DynamicModel::writeDynamicCFile(const string &basename) const
                   << " */" << endl
                   << endl
                   << "#include <stdlib.h>" << endl
-#ifndef __APPLE__
-                  << "#include <uchar.h>" << endl // For MATLAB ≤ R2011a
-#else
-                  << "typedef uint_least16_t char16_t;" << endl
-                  << "typedef uint_least32_t char32_t;" << endl // uchar.h does not exist on macOS
-#endif
                   << R"(#include "mex.h")" << endl
                   << endl
                   << "void dynamic_resid_tt(const double *y, const double *x, int nb_row_x, const double *params, const double *steady_state, int it_, double *T);" << endl
diff --git a/src/StaticModel.cc b/src/StaticModel.cc
index 2a7958b783b938827538b83e6a855e5109c63108..66fb7fc2435bc7c80a93b3f1ed90895fa250af74 100644
--- a/src/StaticModel.cc
+++ b/src/StaticModel.cc
@@ -1603,14 +1603,7 @@ StaticModel::writeStaticCFile(const string &basename) const
 
   if (external_functions_table.get_total_number_of_unique_model_block_external_functions())
     // External Matlab function, implies Static function will call mex
-    output
-#ifndef __APPLE__
-      << "#include <uchar.h>" << endl // For MATLAB ≤ R2011a
-#else
-      << "typedef uint_least16_t char16_t;" << endl
-      << "typedef uint_least32_t char32_t;" << endl // uchar.h does not exist on macOS
-#endif
-      << R"(#include "mex.h")" << endl;
+    output << R"(#include "mex.h")" << endl;
 
   output << "#define max(a, b) (((a) > (b)) ? (a) : (b))" << endl
          << "#define min(a, b) (((a) > (b)) ? (b) : (a))" << endl;
@@ -1645,12 +1638,6 @@ StaticModel::writeStaticCFile(const string &basename) const
          << " */" << endl
          << endl
          << "#include <stdlib.h>" << endl
-#ifndef __APPLE__
-         << "#include <uchar.h>" << endl // For MATLAB ≤ R2011a
-#else
-         << "typedef uint_least16_t char16_t;" << endl
-         << "typedef uint_least32_t char32_t;" << endl // uchar.h does not exist on macOS
-#endif
          << R"(#include "mex.h")" << endl
          << endl
          << "void static_resid_tt(const double *y, const double *x, int nb_row_x, const double *params, double *T);" << endl