diff --git a/Sofa/framework/Helper/src/sofa/helper/system/FileSystem.cpp b/Sofa/framework/Helper/src/sofa/helper/system/FileSystem.cpp index 73af2abafea..e3c963d724a 100644 --- a/Sofa/framework/Helper/src/sofa/helper/system/FileSystem.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/system/FileSystem.cpp @@ -524,7 +524,7 @@ bool FileSystem::openFileWithDefaultApplication(const std::string& filename) success = true; #elif defined(__APPLE__) pid_t pid; // points to a buffer that is used to return the process ID of the new child process. - char* argv[] = {const_cast("open"), vconst_cast(filename.c_str()), nullptr}; + char* argv[] = {const_cast("open"), const_cast(filename.c_str()), nullptr}; if (posix_spawn(&pid, "/usr/bin/open", nullptr, nullptr, argv, environ) == 0) { int status;